Hyper-V Value Commands
Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER)
Get-ClusterNode | select Name
Get-VM -ClusterObject (Get-ClusterResource | where ResourceType -eq "Virtual Machine") Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER) Get-VM –computername ‘Contos-HyperV-1’ | EXPORT-CSV C:PowershellVMlist.csv
Get-WmiObject -class MSFC_FCAdapterHBAAttributes -namespace "root\WMI" | ForEach-Object {(($_.NodeWWN) | ForEach-Object {"{0:x}" -f $_}) -join ":"} Get-VM * |sort-object| ft -auto Name,path,configurationlocation,snapshotfilelocation,@{L="Disks";E={$_.harddrives.path}}
Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER) * |sort-object| ft -auto Name,path,configurationlocation,snapshotfilelocation,@{L="Disks";E={$_.harddrives.path}} Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER) * |sort-object| ft -auto Name,path,configurationlocation,snapshotfilelocation,@{L="Disks";E={$_.harddrives.path}} > C:\Reports
Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER)| Where { $_.State –eq ‘Running’ } Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER)| Where { $_.State –eq ‘off’ } Get-VM -ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER) | Get-VMNetworkAdapter Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER) | Get-VMSnapshot
Get-VM | ?{$_.State -eq "Running"} | Get-VMNetworkAdapter | Select VMName, IPAddresses Get-VM | Select-Object -ExpandProperty NetworkAdapters | Select-Object VMName,IPAddresses Get-VM | Select-Object NetworkAdapters | Select-Object VMName, IPAddresses, switchName Get-VM | Get-VMNetworkAdapter | ft VMName, MacAddress
Get-VM –ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER) * |sort-object| ft -auto Name,path,configurationlocation,snapshotfilelocation,@{L="Disks";E={$_.harddrives.path}} | EXPORT-CSV C:PowershellVMlist.csv
Get-WmiObject -class MSFC_FCAdapterHBAAttributes -namespace "root\WMI" | ForEach-Object {(($_.NodeWWN) | ForEach-Object {"{0:x}" -f $_}) -join ":"}
LIST VSAN Disks VM & Host
Get-VM -ComputerName (Get-ClusterNode –Cluster HYPERVCLUSTER) | Get-VMFibreChannelHba
Download: HyperV
ilgili Linkler
https://www.petri.com/create-windows-server-2012-r2-cluster-shared-volume
https://community.spiceworks.com/scripts/show/1835-check-csv-disk-usage-and-alert
http://www.aidanfinn.com/?p=19576