Author Posts

May 7, 2015 at 3:12 pm

Hello Powershell comunity,

I have the following question, is there any way to get all the Share Drives in my domain?
I was thinking about the get-wmiobject but I'm not sure how to reach out to all the servers in the domain.

I'll appreciate you help on this, I'm level 1 Intel support and after take a few Powershell courses through MVA I'm sure that I can do it with Powershell

Thank you!

May 8, 2015 at 2:17 am

Get-WmiObject -Class Win32_Share will return the shares on a particular machine. Use the -ComputerName parameter to access a remote machine.

If you can I'd use
Get-CimInstance -ClassName Win32_Share

and CIM sessions to access remote machines rather than the DSCOM based Get-WmiObject