Eric Perez
asked on
Powershell script to pull Info from all server within a domain
Hi,
I need help in getting a Powershell script in retrieving info from servers with in a domain OR OU and getting an output to an xlsx file.
Search through domain servers
1. look for this in the host name "FS", "FP", “DFS”, “RP” in name
2. Host-name and OS of the Server.
3. if the File services is installed
4. if File service is installed show the path to shares per its server
thanks,
Eric
I need help in getting a Powershell script in retrieving info from servers with in a domain OR OU and getting an output to an xlsx file.
Search through domain servers
1. look for this in the host name "FS", "FP", “DFS”, “RP” in name
2. Host-name and OS of the Server.
3. if the File services is installed
4. if File service is installed show the path to shares per its server
thanks,
Eric
ASKER
I am getting this error....
Exception calling "FindAll" with "0" argument(s): "Unspecified error
"
At C:\Users\adm.ep546\Desktop \ServerLoo k.ps1:9 char:1
+ $Computers = $ADSI.FindAll().Properties .Name
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : COMException
Exception calling "FindAll" with "0" argument(s): "Unspecified error
"
At C:\Users\adm.ep546\Desktop
+ $Computers = $ADSI.FindAll().Properties
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : COMException
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome!!!! it worked like a charm.
Open in new window
It is limited to 1000 servers.. but if you have more, then you can increase the limit numbers in the script..
It's not completely tested, but it should work. You will need to make sure you have WMI access and Powershell remoting access..
Coralon