Merge pull request #120 from isjwuk/master
Submitting Get-TotalMemoryAllocation.ps1 and Get-TotalDiskUsage.ps1
This commit is contained in:
4
Scripts/Get-TotalDiskUsage.ps1
Normal file
4
Scripts/Get-TotalDiskUsage.ps1
Normal file
@@ -0,0 +1,4 @@
|
||||
#Script returns total disk usage by all Powered On VMs in the environment in Gigabytes
|
||||
#Author: Chris Bradshaw via https://isjw.uk/using-powercli-to-measure-vm-disk-space-usage/
|
||||
|
||||
[math]::Round(((get-vm | Where-object{$_.PowerState -eq "PoweredOn" }).UsedSpaceGB | measure-Object -Sum).Sum)
|
||||
6
Scripts/Get-TotalMemoryAllocation.ps1
Normal file
6
Scripts/Get-TotalMemoryAllocation.ps1
Normal file
@@ -0,0 +1,6 @@
|
||||
#Script gets total memory allocation in GB of all powered on VMs in the environment
|
||||
#Author: Chris Bradshaw via https://isjw.uk/powercli-snippet-total-memory-allocation/
|
||||
|
||||
[System.Math]::Round(((get-vm |
|
||||
where-object{$_.PowerState -eq "PoweredOn" }).MemoryGB |
|
||||
Measure-Object -Sum).Sum ,0)
|
||||
Reference in New Issue
Block a user