< Back

Set-HVCIOptions

Thu Apr 04, 2019 5:41 am

NAME Set-HVCIOptions



SYNOPSIS

Modifies hypervisor Code Integrity options for a policy.





SYNTAX

Set-HVCIOptions [-FilePath] <String> [-DebugMode] [-Enabled] [-Strict] [<CommonParameters>]



Set-HVCIOptions [-FilePath] <String> [-None] [<CommonParameters>]





DESCRIPTION

The Set-HVCIOptions cmdlet modifies hypervisor Code Integrity options for a policy. The policy stores these options in the HvciOptions property of

the policy. You can specify any combination of the following values:



-- Enabled

-- DebugMode

-- Strict





PARAMETERS

-DebugMode [<SwitchParameter>]

Indicates that this cmdlet turns on DebugMode in the policy.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Enabled [<SwitchParameter>]

Indicates that this cmdlet turns on Enabled in the policy.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-FilePath <String>

Specifies the path of the policy .xml file that this cmdlet modifies.



Required? true

Position? 1

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-None [<SwitchParameter>]

Indicates that this cmdlet removes all hypervisor Code Integrity options from the policy. In the policy itself, HvciOptions takes a value of

zero (0).



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Strict [<SwitchParameter>]

Indicates that this cmdlet turns on Strict in the policy.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS











OUTPUTS











Example 1: Assign the Strict option



PS C:\\>Set-HVCIOptions -Strict -FilePath '.\\Policy.xml'

PS C:\\> Get-Content -Path '.Policy.xml'

<CiSigner SignerId="ID_SIGNER_S_21" />

</CiSigners>

<HvciOptions>2</HvciOptions>

</SiPolicy>



The first command assigns the Strict option in Policy.xml.



The second command displays the contents of the policy. This example shows the last few lines of the policy, which include the HvciOptions

property. It now has a value of 2.







RELATED LINKS

Set-RuleOption