Enable a named item in XAML with PowerShell

Hello, Here is a Function I wrote to enable a named item disabled by design or previously disabled. Function Enable-NamedItem { [CmdletBinding()] Param( [String[]]$Item, [Object]$Window = $Window ) foreach ($object in $Item) { $Window.$object.IsEnabled = $true } }

Disable a named item in XAML with PowerShell

Hello, Here is a function I wrote for my current script, to create user in Active Direcotry with a GUI in XAML, and which will disable a named item in the XAML. Function Disable-NamedItem { [CmdletBinding()] Param( [String[]]$Item, [Object]$Window = $Window ) foreach ($object in $Item) { $Window.$object.IsEnabled = $false } }