Enable-VMEventing

Enables virtual machine eventing.

Syntax

Enable-VMEventing
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Enable-VMEventing cmdlet enables virtual machine eventing. Virtual machine eventing keeps Hyper-V PowerShell objects updated without polling the virtual machine host. Virtual machine eventing is enabled by default.

Examples

Example 1

PS C:\>Enable-VMEventing -Force

Enables virtual machine eventing, suppressing the confirmation prompt.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-Force

Specifies that the confirmation prompt is to be suppressed. (This is useful in scripting the cmdlet.)

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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