February 2019
Intermediate to advanced
626 pages
15h 51m
English
AllowEmptyString fills the gap, allowing both null and empty values to be supplied for a mandatory string parameter. In both cases, the resulting assignment will be an empty string. It is not possible to distinguish between a value passed as null and a value passed as an empty string:
function Test-AllowEmptyString { [CmdletBinding()] param ( [Parameter(Mandatory)] [AllowEmptyString()] [String]$Parameter1 )}
Read now
Unlock full access