Get File Shares PowerShell Function

Get-FileShares PowerShell function will enumerate all shares (except administrative, but including those that end in a dollar sign ($) on a remote machine and optionally send the output to a CSV file.
The following share properties will be included in the export:
ServerName | ShareName | SharePath | Description

ServerName ShareName SharePath Description
FILESERVER01 \\FILESERVER01\CustomerCare E:\Groups\CustomerCare Customer Care Group Share
FILESERVER01 \\FILESERVER01\Groups_E$ E:\Groups\ Group Share Drive E:
FILESERVER01 \\FILESERVER01\Software$ D:\Software Hidden share for DCA use


Defines the name of the target server
Specifies the path of the exported CSV file


or simply

This will generate a file c:\exports\FILESERVER01_Shares_01-15-2015.csv

Download Link

The Code



Leave a Reply

Your email address will not be published. Required fields are marked *