Get a List of all the sharedrives in my domain

Welcome Forums General PowerShell Q&A Get a List of all the sharedrives in my domain

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
3 years, 8 months ago.

  • Author
    Posts
  • #25025

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

The topic ‘Get a List of all the sharedrives in my domain’ is closed to new replies.