Get a List of all the sharedrives in my domain

This topic contains 1 reply, has 2 voices, and was last updated by  Richard Siddaway 3 years, 1 month ago.

  • Author
  • #25025

    Vixon Haro

    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!

  • #25043

    Richard Siddaway

    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

You must be logged in to reply to this topic.