Powershell - Get-ADComputer -properties memberof

后端 未结 3 1045
时光取名叫无心
时光取名叫无心 2021-01-25 10:36

I am trying to find if any servers in our enviroment have NOT been applied to a particular group. I have a list of groups that we use to patch our Windows Servers on partiular d

3条回答
  •  庸人自扰
    2021-01-25 11:27

    $servers = get-adcomputer -Filter 'ObjectClass -eq "Computer"' -properties * |
    if($server.OperatingSystem -match "Windows Server 200[38]" | 
    % { $_.Server } | select Domain,Name,Roles,OSVersion,IPAddress
    

    Provides only 2003 and 2008 matches filtering

提交回复
热议问题