Using PowerShell to retrieve workstations and/or servers from AD

Servers

Get-ADComputer -Filter {OperatingSystem -Like “*server*”} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto

Workstations

Get-ADComputer -Filter {OperatingSystem -NotLike “*server*”} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto

Both

Get-ADComputer -Filter * -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto

Inventorying Computers with AD PowerShell

 

 

Group Policy Modelling “The given Key was not present in the dictionary”

I found this recently when running GPO modelling and there is a Microsoft article that describes the symptom caused by using the GPO registry wizard to import registry settings.

https://support.microsoft.com/en-gb/kb/2692409

Unfortunately I was not able to find a quick way and had to look through all GPOs for the Registry Wizard Values key.  Underneath this key, the offending item has a blank type/ value name.

untitled