From 5e49bfaaf761d992c2bd61a1c1e1c16095df840f Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Mon, 29 Aug 2022 05:00:54 +0000
Subject: [PATCH 1/4] Move Resources to main
---
.../docs/Az.Authorization.md | 2 +-
.../Authorization.Autorest/generate-info.json | 8 +-
.../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 2 +-
.../MSGraph.Autorest/Az.MSGraph.format.ps1xml | 28 +++
.../MSGraph.Autorest/custom/Get-AzADUser.ps1 | 6 +
.../MSGraph.Autorest/custom/New-AzADUser.ps1 | 8 +-
.../MSGraph.Autorest/docs/Get-AzADUser.md | 21 ++-
.../MSGraph.Autorest/docs/New-AzADUser.md | 48 +++--
.../MSGraph.Autorest/docs/Remove-AzADUser.md | 7 +
.../MSGraph.Autorest/docs/Update-AzADUser.md | 7 +
.../MSGraph.Autorest/examples/New-AzADUser.md | 14 +-
.../MSGraph.Autorest/exports/Get-AzADUser.ps1 | 6 +
.../MSGraph.Autorest/exports/New-AzADUser.ps1 | 28 +--
.../exports/ProxyCmdletDefinitions.ps1 | 48 +++--
.../exports/Remove-AzADUser.ps1 | 7 +
.../exports/Update-AzADUser.ps1 | 7 +
.../MSGraph.Autorest/generate-info.json | 8 +-
...icrosoftGraphEmployeeOrgData.PowerShell.cs | 178 ++++++++++++++++++
...osoftGraphEmployeeOrgData.TypeConverter.cs | 147 +++++++++++++++
.../ApiV10/MicrosoftGraphEmployeeOrgData.cs | 81 ++++++++
...icrosoftGraphEmployeeOrgData.dictionary.cs | 69 +++++++
.../MicrosoftGraphEmployeeOrgData.json.cs | 113 +++++++++++
.../ApiV10/MicrosoftGraphUser.PowerShell.cs | 16 ++
.../api/Models/ApiV10/MicrosoftGraphUser.cs | 45 +++++
.../ApiV10/MicrosoftGraphUser.dictionary.cs | 4 +-
.../Models/ApiV10/MicrosoftGraphUser.json.cs | 6 +-
.../cmdlets/NewAzAdUser_CreateExpanded.cs | 25 +++
.../cmdlets/UpdateAzAdUser_UpdateExpanded.cs | 25 +++
.../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 2 +-
.../internal/New-AzADUser.ps1 | 29 +++
.../internal/ProxyCmdletDefinitions.ps1 | 53 ++++++
.../internal/Update-AzADUser.ps1 | 24 +++
src/Resources/Resources/Az.Resources.psd1 | 8 +-
src/Resources/Resources/help/Az.Resources.md | 2 +-
src/Resources/Resources/help/Get-AzADUser.md | 19 +-
.../help/Get-AzRoleEligibilitySchedule.md | 2 -
src/Resources/Resources/help/New-AzADUser.md | 50 +++--
.../Resources/help/Remove-AzADUser.md | 7 +
.../Resources/help/Update-AzADUser.md | 7 +
39 files changed, 1091 insertions(+), 76 deletions(-)
create mode 100644 src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.PowerShell.cs
create mode 100644 src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.TypeConverter.cs
create mode 100644 src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.cs
create mode 100644 src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.dictionary.cs
create mode 100644 src/Resources/MSGraph.Autorest/generated/api/Models/ApiV10/MicrosoftGraphEmployeeOrgData.json.cs
diff --git a/src/Resources/Authorization.Autorest/docs/Az.Authorization.md b/src/Resources/Authorization.Autorest/docs/Az.Authorization.md
index 7eef9be21736..72fad91f343e 100644
--- a/src/Resources/Authorization.Autorest/docs/Az.Authorization.md
+++ b/src/Resources/Authorization.Autorest/docs/Az.Authorization.md
@@ -1,6 +1,6 @@
---
Module Name: Az.Authorization
-Module Guid: 7410e7c8-1228-4519-b21e-ede757f80297
+Module Guid: 9a7f9619-b38e-4642-a74d-2298096962a0
Download Help Link: https://docs.microsoft.com/powershell/module/az.authorization
Help Version: 1.0.0.0
Locale: en-US
diff --git a/src/Resources/Authorization.Autorest/generate-info.json b/src/Resources/Authorization.Autorest/generate-info.json
index 10b2cece9c6c..88b45d784c6e 100644
--- a/src/Resources/Authorization.Autorest/generate-info.json
+++ b/src/Resources/Authorization.Autorest/generate-info.json
@@ -1,8 +1,8 @@
{
"node": "v14.15.5",
- "autorest_core": "3.8.4",
- "autorest_modelerfour": "4.15.414",
- "autorest_powershell": "3.0.492",
+ "autorest_powershell": "3.0.494",
+ "swagger_commit": "6b08774c89877269e73e11ac3ecbd1bd4e14f5a0",
"autorest": "`-- (empty)",
- "swagger_commit": "8c3029730778c35b597aa6d1afe69e78872bf03c"
+ "autorest_modelerfour": "4.15.414",
+ "autorest_core": "3.9.2"
}
diff --git a/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs
index a5e57e2ea2b4..3264ce9f6528 100644
--- a/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs
+++ b/src/Resources/Authorization.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs
@@ -163,7 +163,7 @@ protected override void ProcessRecord()
if (previewVersion != null)
{
- sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}");
+ sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'");
}
sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule Authorization".Split(' ').ToPsList().NullIfEmpty() ?? "''"}");
sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'");
diff --git a/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml b/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml
index 223ba8cdd526..f46c6da251e5 100644
--- a/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml
+++ b/src/Resources/MSGraph.Autorest/Az.MSGraph.format.ps1xml
@@ -897,6 +897,34 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgData
+
+ Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEmployeeOrgData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CostCenter
+
+
+ Division
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphEndpoint
diff --git a/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1
index e23f3a22642e..887ab0cba1b5 100644
--- a/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1
+++ b/src/Resources/MSGraph.Autorest/custom/Get-AzADUser.ps1
@@ -68,6 +68,12 @@ function Get-AzADUser {
[System.String[]]
# Select properties to be returned
${Select},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Query')]
+ [System.Management.Automation.SwitchParameter]
+ # Include count of items
+ ${Count},
[Parameter(ParameterSetName='List')]
[Parameter(ParameterSetName='StartsWithParameterSet')]
diff --git a/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1 b/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1
index ad9d347fe7cd..a2e07da92f85 100644
--- a/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1
+++ b/src/Resources/MSGraph.Autorest/custom/New-AzADUser.ps1
@@ -25,7 +25,7 @@ https://docs.microsoft.com/powershell/module/az.resources/new-azaduser
#>
function New-AzADUser {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser])]
-[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+[CmdletBinding(DefaultParameterSetName='WithPassword', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')]
@@ -273,7 +273,7 @@ param(
# The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword.Supports $filter (ne, NOT).
${PasswordPolicy},
- [Parameter()]
+ [Parameter(ParameterSetName="WithPasswordProfile", Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile]
# passwordProfile
@@ -391,12 +391,12 @@ param(
# Supports $filter (eq, ne, NOT, in,).
${UserType},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName="WithPassword", Mandatory)]
[SecureString]
# Password for the user. It must meet the tenant's password complexity requirements. It is recommended to set a strong password.
${Password},
- [Parameter()]
+ [Parameter(ParameterSetName="WithPassword")]
[System.Management.Automation.SwitchParameter]
# It must be specified if the user must change the password on the next successful login (true). Default behavior is (false) to not change the password on the next successful login.
${ForceChangePasswordNextLogin},
diff --git a/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md
index 7a777e8401a9..d57660f73f69 100644
--- a/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md
+++ b/src/Resources/MSGraph.Autorest/docs/Get-AzADUser.md
@@ -14,9 +14,9 @@ Lists entities from users or get entity from users by key
### List (Default)
```
-Get-AzADUser [-AppendSelected] [-ConsistencyLevel ] [-DefaultProfile ] [-Expand ]
- [-Filter ] [-First ] [-Orderby ] [-Search ] [-Select ]
- [-Skip ] []
+Get-AzADUser [-Count] [-AppendSelected] [-ConsistencyLevel ] [-DefaultProfile ]
+ [-Expand ] [-Filter ] [-First ] [-Orderby ] [-Search ]
+ [-Select ] [-Skip ] []
```
### DisplayNameParameterSet
@@ -114,6 +114,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
+### -Count
+Include count of items
+
+```yaml
+Type: System.Management.Automation.SwitchParameter
+Parameter Sets: List
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
diff --git a/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md
index e82afdc5074f..0a29780dc5f9 100644
--- a/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md
+++ b/src/Resources/MSGraph.Autorest/docs/New-AzADUser.md
@@ -12,6 +12,7 @@ Adds new entity to users
## SYNTAX
+### WithPassword (Default)
```
New-AzADUser -DisplayName -MailNickname -Password -UserPrincipalName
[-AboutMe ] [-AccountEnabled ] [-AgeGroup ] [-Birthday ] [-City ]
@@ -21,11 +22,26 @@ New-AzADUser -DisplayName -MailNickname -Password ] [-ForceChangePasswordNextLogin] [-GivenName ] [-HireDate ]
[-ImmutableId ] [-Interest ] [-IsResourceAccount] [-JobTitle ] [-Mail ]
[-MobilePhone ] [-MySite ] [-OfficeLocation ] [-OtherMail ]
- [-PasswordPolicy ] [-PasswordProfile ] [-PostalCode ]
- [-PreferredLanguage ] [-PreferredName ] [-Responsibility ] [-School ]
- [-ShowInAddressList] [-Skill ] [-State ] [-StreetAddress ] [-Surname ]
- [-UsageLocation ] [-UserType ] [-DefaultProfile ] [-Confirm] [-WhatIf]
- []
+ [-PasswordPolicy ] [-PostalCode ] [-PreferredLanguage ] [-PreferredName ]
+ [-Responsibility ] [-School ] [-ShowInAddressList] [-Skill ] [-State ]
+ [-StreetAddress ] [-Surname ] [-UsageLocation ] [-UserType ]
+ [-DefaultProfile ] [-Confirm] [-WhatIf] []
+```
+
+### WithPasswordProfile
+```
+New-AzADUser -DisplayName -MailNickname -PasswordProfile
+ -UserPrincipalName [-AboutMe ] [-AccountEnabled ] [-AgeGroup ]
+ [-Birthday ] [-City ] [-CompanyName ] [-ConsentProvidedForMinor ]
+ [-Country ] [-DeletedDateTime ] [-Department ] [-DeviceEnrollmentLimit ]
+ [-EmployeeHireDate ] [-EmployeeId ] [-EmployeeType ] [-ExternalUserState ]
+ [-ExternalUserStateChangeDateTime ] [-FaxNumber ] [-GivenName ]
+ [-HireDate ] [-ImmutableId ] [-Interest ] [-IsResourceAccount]
+ [-JobTitle ] [-Mail ] [-MobilePhone ] [-MySite ] [-OfficeLocation ]
+ [-OtherMail ] [-PasswordPolicy ] [-PostalCode ] [-PreferredLanguage ]
+ [-PreferredName ] [-Responsibility ] [-School ] [-ShowInAddressList]
+ [-Skill ] [-State ] [-StreetAddress ] [-Surname ] [-UsageLocation ]
+ [-UserType ] [-DefaultProfile ] [-Confirm] [-WhatIf] []
```
## DESCRIPTION
@@ -33,13 +49,23 @@ Adds new entity to users
## EXAMPLES
-### Example 1: Create user
+### Example 1: Create user with password profile
```powershell
+$password = "xxxxxxxxxx"
$pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password}
New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
```
-Create user
+Create user with password profile
+
+### Example 2: Create user with password
+```powershell
+$password = "xxxxxxxxxx"
+$password = ConvertTo-SecureString -AsPlainText -Force $password
+New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
+```
+
+Create user with password
## PARAMETERS
@@ -363,7 +389,7 @@ Default behavior is (false) to not change the password on the next successful lo
```yaml
Type: System.Management.Automation.SwitchParameter
-Parameter Sets: (All)
+Parameter Sets: WithPassword
Aliases:
Required: False
@@ -585,7 +611,7 @@ It is recommended to set a strong password.
```yaml
Type: System.Security.SecureString
-Parameter Sets: (All)
+Parameter Sets: WithPassword
Aliases:
Required: True
@@ -619,10 +645,10 @@ To construct, see NOTES section for PASSWORDPROFILE properties and create a hash
```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile
-Parameter Sets: (All)
+Parameter Sets: WithPasswordProfile
Aliases:
-Required: False
+Required: True
Position: Named
Default value: None
Accept pipeline input: False
diff --git a/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md b/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md
index 147933e37483..784591a17389 100644
--- a/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md
+++ b/src/Resources/MSGraph.Autorest/docs/Remove-AzADUser.md
@@ -236,6 +236,10 @@ To create the parameters described below, construct a hash table containing the
- `[DeviceVersion ]`: For internal use only.
- `[EmployeeHireDate ]`: The date and time when the user was hired or will start work in case of a future hire. Supports $filter (eq, ne, NOT , ge, le, in).
- `[EmployeeId ]`: The employee identifier assigned to the user by the organization. Supports $filter (eq, ne, NOT , ge, le, in, startsWith).
+ - `[EmployeeOrgData ]`: employeeOrgData
+ - `[(Any)