terça-feira, 29 de março de 2016

Quick tip: Find a Share Path with Powershell

Managing a 30TB+ file services infrastructure with 3000+ shares I face in a daily basis simple challenges like the urgent need to know the path from a share. 

The small powershell code below does the trick:

PS C:\Windows\system32> Get-WmiObject -Class Win32_Share -Computer FILESERVER01 | Select Name, Path | Where-Object { $_.Name -eq "Share Name" }

Replace the red marked parts with the server name and share respectively. Enjoy!