Hi
I’m doing a basic query to find out the all the Server in one domain. I run the following line
Get-ADComputer -Filter {OperatingSystem -Like “Windows Server*”} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto
and I’m getting this error
Get-ADComputer : Error parsing query: ‘OperatingSystem -Like “Windows Server*”’ Error Message: ‘syntax error’ at position: ‘23’.
At C:\Users\hguzman\Desktop\PSScripts\servers.ps1:10 char:1
- Get-ADComputer -Filter {OperatingSystem -Like “Windows Server*”} -Property * | F …
-
+ CategoryInfo : ParserError: (:) [Get-ADComputer], ADFilterParsingException + FullyQualifiedErrorId : Error parsing query: 'OperatingSystem -Like “Windows Server*”' Error Message: 'syntax error' at position: '23'.,Microsoft.Act iveDirectory.Management.Commands.GetADComputer
why I get this error?