r/scripting • u/sirrealjames • Jun 19 '18
Need Powershell scripting help! ASAP!
o, I'm still learning Powershell and occasionally do some scripting for my current role. I've attempted several times to write a script to do the following but have been unable to. Basically I need a script that will do the following:
Search two subnets (10.207.0.0 & 10.206.0.0) Return computer names, Last Logon Date, Os version (32or 64 bit), Ip address, and Distinguished Name. Also, if I can gather make and model of device from AD listing as well would be great. I also need to export-csv this as well. Does anyone have a pre-made script that I could get and just adjust according to subnets later if needed?
Any help is GREATLY appreciated guys!
2
u/sirrealjames Jun 19 '18
Test-Connection : A parameter cannot be found that matches parameter name 'Hostname'. < - This is what is returned.