Recently I was requested to locate the configured shares on the file servers and how they are mapped to their associated directories. As this information not only had to be retrieved, but also typed out to be passed along to the various managers, I decide a nice little PowerShell command would help accomplish this task in a quick fashion. What this command is set up to do is to get the file shares and organize them by the name and path, get the logical mapping of that share and finally pipe that information into a file called "outfile.txt" in the C:\temp directory. The location that the command saves to as well as the file name can be changed to whatever knocks your socks off.
To get the share file paths in use by a server issue command:
This command will result in the outfile.txt and you can then copy and paste that information into whatever documentation you would like, or simply pass it along the way that it is. In my case I put the data into an Excel Spread Sheet just to make it a little easier to navigate through...
To get the share file paths in use by a server issue command:
Get-WmiObject win32_share | ft name, path - auto | win32_logicaldisk | Out-File C:\temp\outfile.txt
This command will result in the outfile.txt and you can then copy and paste that information into whatever documentation you would like, or simply pass it along the way that it is. In my case I put the data into an Excel Spread Sheet just to make it a little easier to navigate through...
Comments
Post a Comment