posted on August 31st 2015, at 11:45
by lunarg
Powershell can also handle queries through WMI, allowing you retrieve all kinds of system information from local and remote systems running Windows. This also includes information about volumes, logical drives and shares.

For this to work on remote systems, you need to have Remote Management enabled. Starting from Server 2012, this is already enabled by default.

The commands use the Get-WmiObject cmdlet to retrieve the information. If no computer name is specified, the information will be retrieved from the system running the cmdlet. In order to connect to a remote system, run the cmdlet while specifying the computer name of the remote host with the -ComputerName parameter.

For example, t  ...
 
last updated on August 31st 2015, at 11:45 by lunarg

Cross-reference shares with the volume they are on (one-liner version).

/media/mime/48/txt.png
Get-SharesVolumes-1L.ps1
Text file
520 B
 
last updated on August 31st 2015, at 11:45 by lunarg

Cross-reference shares with the volume they are on.

/media/mime/48/txt.png
Get-SharesVolumes.ps1
Text file
939 B
 
last updated on August 31st 2015, at 11:44 by lunarg

Cross-reference shares with the logical disk they are on (one-liner)

/media/mime/48/txt.png
Get-SharesDrives-1L.ps1
Text file
359 B
 
last updated on August 31st 2015, at 11:44 by lunarg

Cross-reference shares with the logical disk they are on.

/media/mime/48/txt.png
Get-SharesDrives.ps1
Text file
676 B
 
 
« November 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
 
Links
 
Quote
« You only find out who is swimming naked when the tide goes out. »
Warren Buffett