This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-WmiObject win32_volume | Select-Object SystemName,Name, BlockSize, Capacity, FreeSpace, DriveLetter , @{Name="CapacityGB";Expression={[math]::round($_.Capacity/1GB,2)}}, @{Name="FreeSpaceGB";Expression={[math]::round($_.FreeSpace/1GB,2)}} , @{Name="FreeSpacePercent";Expression={[math]::round(($_.FreeSpace/($_.Capacity*1.00))*100.00,2)}} , @{Name="Date";Expression={$(Get-Date -f s)}}| Sort-Object Name | Convertto-JSON | |
# This format will allow you to filter on drive name and select a remote computer. | |
# Get-WmiObject win32_volume -ComputerName ServerName | Where-Object {$_.label -match "S\:.*"} | Select-Object SystemName,Name, BlockSize, Capacity, FreeSpace, DriveLetter , @{Name="CapacityGB";Expression={[math]::round($_.Capacity/1GB,2)}}, @{Name="FreeSpaceGB";Expression={[math]::round($_.FreeSpace/1GB,2)}} , @{Name="FreeSpacePercent";Expression={[math]::round(($_.FreeSpace/($_.Capacity*1.00))*100.00,2)}} , @{Name="Date";Expression={$(Get-Date -f s)}}| Sort-Object Name | Convertto-JSON |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function random_text( $type = 'alnum', $length = 8 ) | |
{ | |
switch ( $type ) { | |
case 'alnum': | |
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
break; | |
case 'alpha': | |
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
break; | |
case 'hexdec': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Sample supervisor config file. | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default |
NewerOlder