![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Finding shares in AD with PowerShell All, Is WMI the best way to find all the share on an AD server and the share's permissions? Or is there a better way with Powershell? Thanks in advance. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Finding shares in AD with PowerShell Can you clarify what you mean by AD Server? Domain Controller? Also, what do yo mean by shares? Do you mean published shares in AD or computer shares? Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject C> All, C> C> Is WMI the best way to find all the share on an AD server and the C> share's permissions? Or is there a better way with Powershell? C> C> Thanks in advance. C> |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Finding shares in AD with PowerShell Brandon, thanks for the quick response. I want to find both published shares in AD and computer shares on all servers. "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in message news:29d4f6464ce98ca5e2f2028c41f@xxxxxx Quote: > Can you clarify what you mean by AD Server? Domain Controller? > Also, what do yo mean by shares? Do you mean published shares in AD or > computer shares? > > Brandon Shell > --------------- > Blog: http://www.bsonposh.com/ > PSH Scripts Project: www.codeplex.com/psobject > > C> All, > C> C> Is WMI the best way to find all the share on an AD server and the > C> share's permissions? Or is there a better way with Powershell? > C> C> Thanks in advance. > C> > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Finding shares in AD with PowerShell Are you using windows 2000? I believe they removed published shares post 2k. WMI is you best bet. Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject C> Brandon, thanks for the quick response. C> C> I want to find both published shares in AD and computer shares on all C> servers. C> C> "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in message C> news:29d4f6464ce98ca5e2f2028c41f@xxxxxx C> Quote: Quote: >> Can you clarify what you mean by AD Server? Domain Controller? >> Also, what do yo mean by shares? Do you mean published shares in AD >> or >> computer shares? >> Brandon Shell >> --------------- >> Blog: http://www.bsonposh.com/ >> PSH Scripts Project: www.codeplex.com/psobject >> C> All, >> C> C> Is WMI the best way to find all the share on an AD server and >> the >> C> share's permissions? Or is there a better way with Powershell? >> C> C> Thanks in advance. >> C> |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Finding shares in AD with PowerShell To find the WMI classes that deal with shares Get-WmiObject -List | Where{$_.Name -like "*share*"} To see shares on local machine Get-WmiObject -Class Win32_Share To search remote machines - create a csv file with the server names 1 per line & a header row of Server Import-Csv | Foreach {Get-WmiObject -Class Win32_Share -ComputerName $_.Server} -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "Brandon Shell [MVP]" wrote: Quote: > Are you using windows 2000? I believe they removed published shares post 2k. > > WMI is you best bet. > > > Brandon Shell > --------------- > Blog: http://www.bsonposh.com/ > PSH Scripts Project: www.codeplex.com/psobject > > C> Brandon, thanks for the quick response. > C> > C> I want to find both published shares in AD and computer shares on all > C> servers. > C> > C> "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in message > C> news:29d4f6464ce98ca5e2f2028c41f@xxxxxx > C> Quote: Quote: > >> Can you clarify what you mean by AD Server? Domain Controller? > >> Also, what do yo mean by shares? Do you mean published shares in AD > >> or > >> computer shares? > >> Brandon Shell > >> --------------- > >> Blog: http://www.bsonposh.com/ > >> PSH Scripts Project: www.codeplex.com/psobject > >> C> All, > >> C> C> Is WMI the best way to find all the share on an AD server and > >> the > >> C> share's permissions? Or is there a better way with Powershell? > >> C> C> Thanks in advance. > >> C> > > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Finding shares in AD with PowerShell I am using XP, servers are Win2k and Win2k3. So, you think WMI is my best bet to get published shares in AD, computer\server shares and their permissions? "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in message news:29d4f6464cf18ca5e3adb0f7296@xxxxxx Quote: > Are you using windows 2000? I believe they removed published shares post > 2k. > > WMI is you best bet. > > > Brandon Shell > --------------- > Blog: http://www.bsonposh.com/ > PSH Scripts Project: www.codeplex.com/psobject > > C> Brandon, thanks for the quick response. > C> C> I want to find both published shares in AD and computer shares on > all > C> servers. > C> C> "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in message > C> news:29d4f6464ce98ca5e2f2028c41f@xxxxxx > C> Quote: Quote: >>> Can you clarify what you mean by AD Server? Domain Controller? >>> Also, what do yo mean by shares? Do you mean published shares in AD >>> or >>> computer shares? >>> Brandon Shell >>> --------------- >>> Blog: http://www.bsonposh.com/ >>> PSH Scripts Project: www.codeplex.com/psobject >>> C> All, >>> C> C> Is WMI the best way to find all the share on an AD server and >>> the >>> C> share's permissions? Or is there a better way with Powershell? >>> C> C> Thanks in advance. >>> C> > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Finding shares in AD with PowerShell WMI is the way to go. You can use this Get-WmiObject Win32_Share -comp $servername for permissions you could use get-acl (get-acl \\$ServerName\Share).Access Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject C> I am using XP, servers are Win2k and Win2k3. So, you think WMI is my C> best bet to get published shares in AD, computer\server shares and C> their permissions? C> C> "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in message C> news:29d4f6464cf18ca5e3adb0f7296@xxxxxx C> Quote: Quote: >> Are you using windows 2000? I believe they removed published shares >> post 2k. >> >> WMI is you best bet. >> >> Brandon Shell >> --------------- >> Blog: http://www.bsonposh.com/ >> PSH Scripts Project: www.codeplex.com/psobject >> C> Brandon, thanks for the quick response. >> C> C> I want to find both published shares in AD and computer shares >> on >> all >> C> servers. >> C> C> "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in >> message >> C> news:29d4f6464ce98ca5e2f2028c41f@xxxxxx >> C> Quote: >>>> Can you clarify what you mean by AD Server? Domain Controller? >>>> Also, what do yo mean by shares? Do you mean published shares in AD >>>> or >>>> computer shares? >>>> Brandon Shell >>>> --------------- >>>> Blog: http://www.bsonposh.com/ >>>> PSH Scripts Project: www.codeplex.com/psobject >>>> C> All, >>>> C> C> Is WMI the best way to find all the share on an AD server and >>>> the >>>> C> share's permissions? Or is there a better way with Powershell? >>>> C> C> Thanks in advance. >>>> C> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| One system finding old but not current shares on another | Vista networking & sharing | |||
| PowerShell Leaders Join Forces and offer a pre-release version of PowerShell for 50% off the retail value | PowerShell | |||
| Able to access shares from Vista, but not acces Vista shares. | Vista networking & sharing | |||
| finding the logged on user (user name) with powershell using WMI? | PowerShell | |||
| How can I finding orphaned link file reference in HTML (PowerShell | PowerShell | |||