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
[Parameter(ParameterSetName="CreateUser",HelpMessage="The type of user (e.g., Member, Guest).")]
16
17
[System.String] $UserType,
17
18
18
-
[Parameter(ParameterSetName="CreateUser")]
19
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's preferred language (e.g., en-US).")]
19
20
[System.String] $PreferredLanguage,
20
21
21
-
[Parameter(ParameterSetName="CreateUser")]
22
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The street address of the user's place of business. Maximum length is 1,024 characters.")]
22
23
[System.String] $StreetAddress,
23
24
24
-
[Parameter(ParameterSetName="CreateUser")]
25
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="Indicates how the user was created (e.g., LocalAccount, Invitation).")]
25
26
[System.String] $CreationType,
26
27
27
-
[Parameter(ParameterSetName="CreateUser")]
28
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="Immutable identifier for the user from on-premises directory.")]
28
29
[System.String] $ImmutableId,
29
30
30
-
[Parameter(ParameterSetName="CreateUser")]
31
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's company name, useful for identifying a guest's organization. Maximum length: 64 characters.")]
31
32
[System.String] $CompanyName,
32
33
33
-
[Parameter(ParameterSetName="CreateUser")]
34
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's postal code, specific to their country or region (ZIP code in the U.S.). Maximum length: 40 characters.")]
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's mobile phone number.")]
46
48
[System.String] $Mobile,
47
49
48
-
[Parameter(ParameterSetName="CreateUser")]
49
-
[System.String] $UserStateChangedOn,
50
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="Timestamp of the most recent change to the *externalUserState* property.")]
51
+
[Alias('UserStateChangedOn')]
52
+
[System.String] $ExternalUserStateChangeDateTime,
50
53
51
-
[Parameter(ParameterSetName="CreateUser")]
54
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The given name (first name) of the user. Maximum length is 64 characters.")]
52
55
[System.String] $GivenName,
53
56
54
-
[Parameter(ParameterSetName="CreateUser")]
57
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's country or region; for example, US or UK. Maximum length is 128 characters.")]
55
58
[System.String] $Country,
56
59
57
-
[Parameter(ParameterSetName="CreateUser")]
60
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="Set password policies like DisableStrongPassword or DisablePasswordExpiration. You can use both, separated by a comma.")]
[Parameter(ParameterSetName="CreateUser",Mandatory=$true,HelpMessage="Defines the user's password profile. Required when creating a user. The password must meet the policy requirements-strong by default.")]
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's mail alias. Required when creating a user. Maximum length: 64 characters.")]
64
68
[System.String] $MailNickName,
65
69
66
-
[Parameter(ParameterSetName="CreateUser")]
70
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's job title. Maximum length: 128 characters.")]
67
71
[System.String] $JobTitle,
68
72
69
-
[Parameter(ParameterSetName="CreateUser")]
70
-
[System.String] $UserState,
73
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's external state for invited guest users (e.g., PendingAcceptance, Accepted).")]
74
+
[Alias('UserState')]
75
+
[System.String] $ExternalUserState,
71
76
72
-
[Parameter(ParameterSetName="CreateUser")]
77
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's city location. Maximum length: 128 characters.")]
73
78
[System.String] $City,
74
79
75
-
[Parameter(ParameterSetName="CreateUser")]
80
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="A two-letter country code (ISO 3166). Required for licensed users to verify service availability. Examples: US, JP, GB.")]
76
81
[System.String] $UsageLocation,
77
82
78
-
[Parameter(ParameterSetName="CreateUser")]
83
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's surname (last name). Maximum length: 64 characters.")]
79
84
[System.String] $Surname,
80
85
81
-
[Parameter(ParameterSetName="CreateUser")]
86
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="A list of the user’s additional email addresses (e.g., ['bob@contoso.com', 'Robert@fabrikam.com']). Supports up to 250 entries, each up to 250 characters.")]
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's sign-in name (UPN) in the format alias@domain. It should match the user's email and use a verified domain in the tenant.")]
90
+
[Alias('UPN')]
91
+
[ValidateNotNullOrEmpty()]
92
+
[ValidateScript({
93
+
try {
94
+
$null= [System.Net.Mail.MailAddress]$_
95
+
return$true
96
+
}
97
+
catch {
98
+
throw"UserPrincipalName must be a valid email address."
[Parameter(ParameterSetName="CreateUser",HelpMessage="The user's phone number. Only one number is allowed. Read-only for users synced from on-premises.")]
104
+
[Alias('TelephoneNumber')]
105
+
[System.String] $BusinessPhones,
98
106
99
-
[Parameter(ParameterSetName="CreateUser")]
107
+
[Parameter(ParameterSetName="CreateUser",HelpMessage="Sets the user's age group. Options: null, Minor, NotAdult, or Adult.")]
[Parameter(ParameterSetName="CreateUser",HelpMessage="Represents the identities that can be used to sign in to this user account. Microsoft (also known as a local account), organizations, or social identity providers such as Facebook, Google, and Microsoft can provide identity and tie it to a user account. It might contain multiple items with the same signInType value.")]
[Parameter(ParameterSetName="ByUserIdAndRoleParameters",Mandatory=$true,HelpMessage="Specifies the object ID of the principal (user, group, or service principal) to assign the app role to.")]
[Parameter(ParameterSetName="ByUserIdAndRoleParameters",Mandatory=$true,HelpMessage="Specifies the object ID of the resource service principal (application) that exposes the app role.")]
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,HelpMessage="Specifies the ID of the user (as a UserPrincipalName or ObjectId) to whom the app role is assigned.")]
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,HelpMessage="Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID.")]
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,HelpMessage="Specifies the ID of the app role assignment to remove.")]
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,HelpMessage="Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID.")]
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,HelpMessage="The unique identifier (User ID) of the user whose sponsor you want to remove.")]
0 commit comments