< Back

Add-AppLockerPolicyComment

Fri Jan 10, 2020 8:25 pm

NAME Add-AppLockerPolicyComment



SYNOPSIS

Adds a comment to an AppLocker policy docoument.





SYNTAX

Add-AppLockerPolicyComment [-AppLockerPolicyDocument] <XmlDocument> [-Comment] <String> [-PassThru]

[<CommonParameters>]





DESCRIPTION





PARAMETERS

-AppLockerPolicyDocument <XmlDocument>

AppLocker XmlDocument to prepend the comment to.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Comment <String>



Required? true

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Returns the created XmlElement object to the pipeline. By default, this cmdlet does not generate any output.



Required? false

Position? named

Default value False

Accept pipeline input? true (ByPropertyName)

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Add-AppLockerPolicyComment -AppLockerPolicyDocument $appLockerPolicy -Comment 'Created by AppLockerEx'



Prepends the 'Created by AppLockerEx' comment to the AppLocker policy [XmlDocument] in the '$appLockerPolicy'

variable.











RELATED LINKS