Showing posts with label powered. Show all posts
Showing posts with label powered. Show all posts

Thursday, December 24, 2015

Powershell: VMware one liner to list total vm that are powered on each host

This one liner will query each host and id its cluster total vms and how many VMs are powered on
Get-VMHost | Select @{N="Cluster";E={Get-Cluster -VMHost $_}}, Name, @{N="Total_VMs";E={($_ | Get-VM).Count}},@{N="Powered_On";E={($_ | get-vm | ? {$_.powerstate -like "*ON*"}).count}} | Sort Cluster, Name | fl

Powershell: Microsoft Graph to add new roles to application registration

PowerShell Script Bulk add new roles to application registration in azure. Update $roles with ,Us...