Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Getting full path for remote shares

$
0
0

I'm having a bit of difficulty with this and don't want to have to resort to dumping to excel and filling in the "\"s. or using ShareEnum and dumping the whole network.

I can get a list using:

get-content .\file.txt |

   %{gwmi win32_share -computername $_}|? {$_.type -eq 0} |

   select $.__Server,$.name

 

I want to get a list of the shares in the format  \\server\share

 

This output will be piped to get-item.count, in order to find empty shares, then to get-acl/get-access? to get the permissions.

This all goes along with an earlier post of mine about shares.

 

aTdHvAaNnKcSe for any help/insight

 

J


Viewing all articles
Browse latest Browse all 10624

Trending Articles