適用於Windows 2012 R2 Hyper-V
Enable-VMResourceMetering
Reset-VMResourceMetering
Disable-VMResourceMetering
Measure-VM –VMName Greendale-VM
$report = Measure-VM –VMName Greendale-VM
$report | Format-List
Get-VM vm-guest-name | Enable-VMResourceMetering
Get-VM vm-guest-name | Measure-VM | select *
(Measure-VM -VMName vm-guest-name).NetworkMeteredTrafficReport
Add-VMNetworkAdapterAcl -VMName SQL2012 -Action Meter -RemoteIPAddress 10.10.0.0/16 -Direction Outbound
Parameter Set: VMName
Add-VMNetworkAdapterAcl [-VMName] <String[]> -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> [-ComputerName <String[]> ] [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ManagementOS
Add-VMNetworkAdapterAcl -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> -ManagementOS [-ComputerName <String[]> ] [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ResourceObject
Add-VMNetworkAdapterAcl [-VMNetworkAdapter] <VMNetworkAdapterBase[]> -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMObject
Add-VMNetworkAdapterAcl [-VM] <VirtualMachine[]> -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Get-VMNetworkAdapterACL VM1 | Remove-VMNetworkAdapterACL
Enable-VMResourceMetering
Reset-VMResourceMetering
Disable-VMResourceMetering
Measure-VM –VMName Greendale-VM
$report = Measure-VM –VMName Greendale-VM
$report | Format-List
Get-VM vm-guest-name | Enable-VMResourceMetering
Get-VM vm-guest-name | Measure-VM | select *
(Measure-VM -VMName vm-guest-name).NetworkMeteredTrafficReport
Add-VMNetworkAdapterAcl -VMName SQL2012 -Action Meter -RemoteIPAddress 10.10.0.0/16 -Direction Outbound
Parameter Set: VMName
Add-VMNetworkAdapterAcl [-VMName] <String[]> -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> [-ComputerName <String[]> ] [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ManagementOS
Add-VMNetworkAdapterAcl -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> -ManagementOS [-ComputerName <String[]> ] [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ResourceObject
Add-VMNetworkAdapterAcl [-VMNetworkAdapter] <VMNetworkAdapterBase[]> -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMObject
Add-VMNetworkAdapterAcl [-VM] <VirtualMachine[]> -Action <VMNetworkAdapterAclAction> -Direction <VMNetworkAdapterAclDirection> [-LocalIPAddress <String[]> ] [-LocalMacAddress <String[]> ] [-Passthru] [-RemoteIPAddress <String[]> ] [-RemoteMacAddress <String[]> ] [-VMNetworkAdapterName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Get-VMNetworkAdapterACL VM1 | Remove-VMNetworkAdapterACL
留言
張貼留言