You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[AllowEmptyString()] for -Description in Set-LocalGroup/Set-LocalUser #16049
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
changed the title [-]`AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`SetLocalUser`[/-][+]`[AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`SetLocalUser`[/+]on Sep 4, 2021
changed the title [-]`[AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`SetLocalUser`[/-][+]`[AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`Set-LocalUser`[/+]on Sep 6, 2021
Activity
[-]`AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`SetLocalUser`[/-][+]`[AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`SetLocalUser`[/+]iSazonov commentedon Sep 4, 2021
The module is not in the repository. Please report the issue with Windows Feedback tool.
[-]`[AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`SetLocalUser`[/-][+]`[AllowEmptyString()]` for `-Description` in `Set-LocalGroup`/`Set-LocalUser`[/+]iRon7 commentedon Sep 6, 2021
Ilya (@iSazonov) , I am somewhat confused here:
If I:
Set-LocalGroupdocumentation web page(https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/set-localgroup?view=powershell-5.1)
Feedback
Submit and view feedback for
[This Product]I end up in this PowerShell/PowerShell repository...
Afaik, the related commands are here:
PowerShell/src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/What do you mean with the Windows Feedback tool?
iSazonov commentedon Sep 6, 2021
The module is not compiled in the repository because of compliance issues. So it is only Windows PowerShell module.
On Windows press Start button and type Feedback
iRon7 commentedon Sep 6, 2021
I feel a little 😳 that I wasn't aware of the Windows Feedback tool.
Anyways I have opened a case in there at referred to this issue.
iSazonov commentedon Jul 9, 2024
Fixed in community module https://www.powershellgallery.com/packages/LocalAccounts