Summary
There's a Get-MgUser without a Set-MgUser which is not in accordance with PowerShell Verb Naming Recommendations
Instead of a Set-MgUser, there's an Update-MgUser which is not easily discoverable.
Description
For so many years we used the Set verb in multiple PowerShell modules, Set-ADUser, Set-User, Set-Mailbox, Set-AzureADUser, Set-MsolUser, etc…
Per PowerShell naming recommendations, the Get verb "Specifies an action that retrieves a resource. This verb is paired with Set."
The MG module itself has tons of other Set cmdlets for users… why did we use Update verb in this case?...
Ask
Rename Update-MgUser to Set-MgUser and add an alias for Update-MgUser (so that scripts still works).
Repro Steps
PS C:\> Get-Command -Noun MgUser
CommandType Name Version Source
----------- ---- ------- ------
Function Get-MgUser 2.12.0 Microsoft.Graph.Users
Function New-MgUser 2.12.0 Microsoft.Graph.Users
Function Remove-MgUser 2.12.0 Microsoft.Graph.Users
Function Update-MgUser 2.12.0 Microsoft.Graph.Users
More Information
PS C:\> Get-Module Microsoft.Graph
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Manifest 2.12.0 Microsoft.Graph
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.2
PSEdition Core
GitCommitId 7.3.2
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Summary There's a Get-MgUser without a Set-MgUser which is not in accordance with PowerShell Verb Naming Recommendations Instead of a Set-MgUser, there's an Update-MgUser which is not easily discoverable.
Description For so many years we used the Set verb in multiple PowerShell modules, Set-ADUser, Set-User, Set-Mailbox, Set-AzureADUser, Set-MsolUser, etc… Per PowerShell naming recommendations, the Get verb "Specifies an action that retrieves a resource. This verb is paired with Set." The MG module itself has tons of other Set cmdlets for users… why did we use Update verb in this case?...
Ask Rename
Update-MgUser
toSet-MgUser
and add an alias forUpdate-MgUser
(so that scripts still works).Repro Steps
More Information