.LINK
https://www.iis.net/configreference/system.webserver/handlers
.LINK
This is part of Sitecore-Automation module https://www.powershellgallery.com/packages/sitecore-automation
#>[CmdletBinding(SupportsShouldProcess=$true)]Param([Parameter(Mandatory=$true)][ValidateScript({Test-Path$_})][string]$XmlPath,[Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()][string]$Name,[Parameter(Mandatory=$true)][string]$Path,[Parameter(Mandatory=$true)][string]$Type,[Parameter(Mandatory=$true)][string]$Verb,

The 'compilation' node before run a command:
<compilation defaultLanguage="c#" debug="true" targetFramework="4.5.2">

The 'compilation' node after run a command (A new attribute was added because of -Force parameter):
<compilation defaultLanguage="c#" debug="false" targetFramework="4.5.2" optimizeCompilations="true >

.LINK
This is part of Sitecore-Automation module https://www.powershellgallery.com/packages/sitecore-automation
#>[CmdletBinding(SupportsShouldProcess=$true)]Param([System.Xml.XmlNode]$Node,[string]$AttrName,[string]$ExpectedValue,[switch]$Force=$false)$attr=$Node.Attributes[$AttrName]if($attr-ne$null){Write-Verbose"Current value of attribute $AttrName = $($attr.Value)"

if($attr.Value-ne$ExpectedValue){Write-Verbose"Set $AttrName to $ExpectedValue"$attr.Value=$ExpectedValue}}else{Write-Warning"Attribute '$AttrName' not exist."if($Force-eq$true){Write-Verbose"Add new attribute $AttrName with value $ExpectedValue"$Node.SetAttribute($AttrName,$ExpectedValue)}}}