Suppress GET-ADComputer output
Posted: Tue Nov 10, 2015 1:54 pm
Product, version and build: PowerShell Studio 2015
32 or 64 bit version of product: 64 bit
Operating system: Windows 8.1
32 or 64 bit OS: 64 bit
Hi,
I am creating a Backup Audit for my company and to get all the known Servers in our organization I am going against Active Directory. I have imported the Active Directory module into my program. I then issue the Get-ADComputer cmdlet and store the results into a variable that I can work with.
When the command runs after I build my program I have output coming out which looks like a AD Structure.
Sample:
Issuing Get-ADComputers command
CN=HCUSSB300,OU=Domain Controllers,DC=hcpna,DC=dmz CN=HCUSSC313,OU=GroupPolicyExclusions,DC=hcpna,DC=dmz CN=HCUSSC323,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC322,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSB301,OU=Domain Controllers,DC=hcpna,DC=dmz CN=HCUSSC326,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC309,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC303,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC302,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC325,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC308,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC320,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC306,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSB399,OU=DMZMemberServers,DC=hcpna,DC=dmz CN=HCUSSB193,OU=DMZMemberServers,DC=hcpna,DC=dmz CN=HCUSSB302,OU=DMZMemberServers,DC=hcpna,DC=dmz CN=HCUSSB310,OU=DMZMemberServers,DC=hcpna,DC=dmz
Actual command being issued:
$HCPServers = Get-ADComputer -Filter { OperatingSystem -Like "Windows Server*" } -Property *
Is there a way to suppress this output?
TIA...
Wayne
32 or 64 bit version of product: 64 bit
Operating system: Windows 8.1
32 or 64 bit OS: 64 bit
Hi,
I am creating a Backup Audit for my company and to get all the known Servers in our organization I am going against Active Directory. I have imported the Active Directory module into my program. I then issue the Get-ADComputer cmdlet and store the results into a variable that I can work with.
When the command runs after I build my program I have output coming out which looks like a AD Structure.
Sample:
Issuing Get-ADComputers command
CN=HCUSSB300,OU=Domain Controllers,DC=hcpna,DC=dmz CN=HCUSSC313,OU=GroupPolicyExclusions,DC=hcpna,DC=dmz CN=HCUSSC323,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC322,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSB301,OU=Domain Controllers,DC=hcpna,DC=dmz CN=HCUSSC326,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC309,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC303,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC302,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC325,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC308,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC320,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSC306,CN=Computers,DC=hcpna,DC=dmz CN=HCUSSB399,OU=DMZMemberServers,DC=hcpna,DC=dmz CN=HCUSSB193,OU=DMZMemberServers,DC=hcpna,DC=dmz CN=HCUSSB302,OU=DMZMemberServers,DC=hcpna,DC=dmz CN=HCUSSB310,OU=DMZMemberServers,DC=hcpna,DC=dmz
Actual command being issued:
$HCPServers = Get-ADComputer -Filter { OperatingSystem -Like "Windows Server*" } -Property *
Is there a way to suppress this output?
TIA...
Wayne