New-LocalUser doesn't work in Power 7.3+ without importing Microsoft.Powershell.LocalAccounts #21645
Open
5 tasks done
Labels
Issue-Bug
Issue has been identified as a bug in the product
Needs-Triage
The issue is new and needs to be triaged by a work group.
WG-Cmdlets
general cmdlet issues
Prerequisites
Steps to reproduce
The above script fails to create the user account in PowerShell 7+, it works fine in PowerShell 5.3...
If I set this underneath the first try statement:
It works perfectly. So, I think something is going wrong.
Expected behavior
The user account is created.
Actual behavior
The useraccount isn't created.
Error details
Could not load type 'Microsoft.PowerShell.Telemetry.Internal.TelemetryAPI' from assembly 'System.Management.Automation, Version=7.4.2.500, Culture=neutral, PublicKeyToken=*****'.
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: