Editar

Compartilhar via


Get-NetFirewallHyperVProfile

Retrieves Hyper-V firewall per-profile settings from the target computer.

Syntax

Get-NetFirewallHyperVProfile
   [-All]
   [-PolicyStore <string>]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <int>]
   [-AsJob] 
   [<CommonParameters>]
Get-NetFirewallHyperVProfile
   [[-Name] <string[]>]
   [-Profile {Any | Domain | Private | Public | NotApplicable}]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <int>]
   [-AsJob] 
   [<CommonParameters>]

Description

The Get-NetFirewallHyperVProfile cmdlet returns the the Hyper-V firewall profile settings on the system. These settings are applicable to all Hyper-V firewall ports created by a specific Hyper-V firewall VM creator. These settings apply to the VM only when the profile is active.

These settings are configurable on a per-store basis. By default, this cmdlet queries the local store.

Examples

EXAMPLE 1

PS C:\> Get-NetFirewallHyperVProfile

This retrieves all the Hyper-V firewall profile settings. With no parameters, this cmdlet queries the settings in the local store.

EXAMPLE 2

PS C:\> Get-NetFirewallHyperVProfile -Name '{9E288F02-CE00-4D9E-BE2B-14CE463B0298}'

This example retrieves all the Hyper-V firewall profile settings for the specified VM creator ID.

EXAMPLE 3

PS C:\> Get-NetFirewallHyperVProfile -PolicyStore ActiveStore

This example retrieves all the Hyper-V firewall profile settings from the ActiveStore.

Parameters

-All

Specifies that all Hyper-V firewall profile settings should be retrieved.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies that only matching Hyper-V firewall profile settings of the indicated Hyper-V firewall VM creator should be retrieved. The format for this value is a GUID enclosed in brackets: '{9E288F02-CE00-4D9E-BE2B-14CE463B0298}'.

Type:String
Aliases:VMCreatorId
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PolicyStore

Targets the policy store from which to retrieve the rules. A policy store is a container for firewall policy. The acceptable values for this parameter are:

  • PersistentStore: Sometimes called static rules, this store contains the persistent policy for the local computer. This policy is not from GPOs, and has been created manually or programmatically (during application installation) on the computer. Rules created in this store are attached to the ActiveStore and activated on the computer immediately.
  • ActiveStore: This store contains the currently active policy, which is the sum of all policy stores that apply to the computer.
  • MDM: This store contains the rules configured via MDM.

By default, the PersistentStore is queried.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Profile

Specifies that only matching Hyper-V firewall profile settings of the indicated profile should be retrieved. Acceptable values are: Any, Domain, Private, Public.

Type:String
Position:Named
Default value:Any
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, Windows PowerShell calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.