Prerequisites
Steps to reproduce
See: StackOverflow question: How to set the description of a local group to blank
The Set-LocalGroup/SetLocalUser cmdlet do not allow empty strings for the -Description parameter (which is set to [ValidateNotNull()]):
New-LocalGroup -Name 'Group1' -Description 'My description'
Name Description
---- -----------
Group1 My description
Set-LocalGroup -Name 'Group1' -Description ''
Expected behavior
Description set to a zero length string:
Get-LocalGroup -Name 'Group1'
Name Description
---- -----------
Group1
Actual behavior
Set-LocalGroup: Cannot bind argument to parameter 'Description' because it is an empty string.
Consequently it is not possible to clear the description with the concerned cmdlets.
Environment data
Name Value
---- -----
PSVersion 7.1.4
PSEdition Core
GitCommitId 7.1.4
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
See: StackOverflow question: How to set the description of a local group to blank
The
Set-LocalGroup/SetLocalUsercmdlet do not allow empty strings for the-Descriptionparameter (which is set to[ValidateNotNull()]):Expected behavior
Description set to a zero length string:
Actual behavior
Environment data