diff --git a/src/Applications/Applications/examples/v1.0-beta/New-MgApplication.md b/src/Applications/Applications/examples/v1.0-beta/New-MgApplication.md index 093355d11d5..31489edf307 100644 --- a/src/Applications/Applications/examples/v1.0-beta/New-MgApplication.md +++ b/src/Applications/Applications/examples/v1.0-beta/New-MgApplication.md @@ -1,18 +1,14 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Create a new application -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +New-MgApplication -DisplayName 'New app' | + Format-List Id, DisplayName, AppId, SignInAudience, PublisherDomain + +Id : 0f0aec7b-ac5b-4f89-9fac-e9044ba5a309 +DisplayName : New app +AppId : c678b75d-1012-4466-8655-1672192232b4 +SignInAudience : AzureADandPersonalMicrosoftAccount +PublisherDomain : M365B977454.onmicrosoft.com ``` -{{ Add description here }} - +This example creates a new application. diff --git a/src/Applications/Applications/examples/v1.0-beta/New-MgApplicationOwnerByRef.md b/src/Applications/Applications/examples/v1.0-beta/New-MgApplicationOwnerByRef.md index 093355d11d5..54881fa23a1 100644 --- a/src/Applications/Applications/examples/v1.0-beta/New-MgApplicationOwnerByRef.md +++ b/src/Applications/Applications/examples/v1.0-beta/New-MgApplicationOwnerByRef.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Add an owner to an application -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} + $NewOwner = @{ + "@odata.id"= "https://graph.microsoft.com/v1.0/directoryObjects/{075b32dd-edb7-47cf-89ef-f3f733683a3f}" + } -{{ Add output here }} +New-MgApplicationOwnerByRef -ApplicationId 'f6b30057-7095-4e2c-89f8-224149f591b7' -BodyParameter $NewOwner ``` -{{ Add description here }} - +In this example, the first command defines the value for the $NewOwner variable. The second command adds the new owner to the specified application. diff --git a/src/Applications/Applications/examples/v1.0-beta/New-MgServicePrincipal.md b/src/Applications/Applications/examples/v1.0-beta/New-MgServicePrincipal.md index 093355d11d5..6681c5ad0db 100644 --- a/src/Applications/Applications/examples/v1.0-beta/New-MgServicePrincipal.md +++ b/src/Applications/Applications/examples/v1.0-beta/New-MgServicePrincipal.md @@ -1,18 +1,16 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Create a new service principal object -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$ServicePrincipalID=@{ + "AppId" = "fc876dd1-6bcb-4304-b9b6-18ddf1526b62" + } +New-MgServicePrincipal -BodyParameter $ServicePrincipalId | + Format-List id, DisplayName, AppId, SignInAudience -{{ Add output here }} +Id : ac483a5f-f291-4499-8a62-058547724579 +DisplayName : Example App +AppId : ffdf268a-2fe2-49e1-8cd7-66ecb61641ec +SignInAudience : AzureADandPersonalMicrosoftAccount ``` -{{ Add description here }} - +In this example, the first command defines the service principal object in the variable $ServiceprincipalId. The second command creates a new service principal object. diff --git a/src/Applications/Applications/examples/v1.0-beta/New-MgUserAppRoleAssignment.md b/src/Applications/Applications/examples/v1.0-beta/New-MgUserAppRoleAssignment.md index 093355d11d5..0b50b0d2263 100644 --- a/src/Applications/Applications/examples/v1.0-beta/New-MgUserAppRoleAssignment.md +++ b/src/Applications/Applications/examples/v1.0-beta/New-MgUserAppRoleAssignment.md @@ -1,18 +1,20 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Assign a user an application role -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +New-MgUserAppRoleAssignment -Userid '8a7c50d3-fcbd-4727-a889-8ab232dfea01' ` + -PrincipalId '8a7c50d3-fcbd-4727-a889-8ab232dfea01' ` + -ResourceId '0873169c-9595-4664-9d02-499b49846ff1' ` + -AppRoleID '00000000-0000-0000-0000-000000000000' | + Format-List Id, AppRoleId, CreationTime, PrincipalDisplayName, + PrincipalId, PrincipalType, ResourceDisplayName, ResourceId -{{ Add output here }} +Id : 01B8ir38J0eoiYqyMt_qAWev_PSoYDBGmcqI9E2dyKI +AppRoleId : 00000000-0000-0000-0000-000000000000 +PrincipalDisplayName : Adele Vance +PrincipalId : 8a7c50d3-fcbd-4727-a889-8ab232dfea01 +PrincipalType : User +ResourceDisplayName : dxprovisioning-analytics +ResourceId : 0873169c-9595-4664-9d02-499b49846ff1 ``` -{{ Add description here }} - +This commands assigns the specified user a role in the specified application resource. diff --git a/src/Applications/Applications/examples/v1.0-beta/Remove-MgUserAppRoleAssignment.md b/src/Applications/Applications/examples/v1.0-beta/Remove-MgUserAppRoleAssignment.md index 093355d11d5..2ddb9b5ebf7 100644 --- a/src/Applications/Applications/examples/v1.0-beta/Remove-MgUserAppRoleAssignment.md +++ b/src/Applications/Applications/examples/v1.0-beta/Remove-MgUserAppRoleAssignment.md @@ -1,18 +1,9 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Remove a user's application role assignment -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Remove-MgUserAppRoleAssignment ` +-AppRoleAssignmentID '01B8ir38J0eoiYqyMt_qAVDX9vgSB6xDur4zn5zOluM' ` +-UserId '8a7c50d3-fcbd-4727-a889-8ab232dfea01' ``` -{{ Add description here }} - +This example removes the specified application role from the specified user. diff --git a/src/Applications/Applications/examples/v1.0-beta/Update-MgApplication.md b/src/Applications/Applications/examples/v1.0-beta/Update-MgApplication.md index 093355d11d5..60e61c5ae2d 100644 --- a/src/Applications/Applications/examples/v1.0-beta/Update-MgApplication.md +++ b/src/Applications/Applications/examples/v1.0-beta/Update-MgApplication.md @@ -1,18 +1,9 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Update an application -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Update-MgApplication ` + -ApplicationId 'f6b30057-7095-4e2c-89f8-224149f591b7' ` + -DisplayName 'Testing App' ``` -{{ Add description here }} - +This example updates the specified application's display name. diff --git a/src/Applications/Applications/examples/v1.0-beta/Update-MgServicePrincipal.md b/src/Applications/Applications/examples/v1.0-beta/Update-MgServicePrincipal.md index 093355d11d5..4d3899870ca 100644 --- a/src/Applications/Applications/examples/v1.0-beta/Update-MgServicePrincipal.md +++ b/src/Applications/Applications/examples/v1.0-beta/Update-MgServicePrincipal.md @@ -1,18 +1,12 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Update the properties of a service principal -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$ServicePrincipalUpdate =@{ + "accountEnabled" = "true" + "appRoleAssignmentRequired" = "true" + } -{{ Add output here }} +Update-MgServicePrincipal -ServicePrincipalId '000e4269-1923-4c8c-9c27-1206e114d421' -BodyParameter $ServicePrincipalUpdate ``` -{{ Add description here }} - +This is example, the first command defines the properties and their values in a hashtable under the variable $ServicePrincipalUpdate. The second command updates the specified service principal. diff --git a/src/Applications/Applications/examples/v1.0/New-MgApplication.md b/src/Applications/Applications/examples/v1.0/New-MgApplication.md index 093355d11d5..31489edf307 100644 --- a/src/Applications/Applications/examples/v1.0/New-MgApplication.md +++ b/src/Applications/Applications/examples/v1.0/New-MgApplication.md @@ -1,18 +1,14 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Create a new application -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +New-MgApplication -DisplayName 'New app' | + Format-List Id, DisplayName, AppId, SignInAudience, PublisherDomain + +Id : 0f0aec7b-ac5b-4f89-9fac-e9044ba5a309 +DisplayName : New app +AppId : c678b75d-1012-4466-8655-1672192232b4 +SignInAudience : AzureADandPersonalMicrosoftAccount +PublisherDomain : M365B977454.onmicrosoft.com ``` -{{ Add description here }} - +This example creates a new application. diff --git a/src/Applications/Applications/examples/v1.0/New-MgApplicationOwnerByRef.md b/src/Applications/Applications/examples/v1.0/New-MgApplicationOwnerByRef.md index 093355d11d5..54881fa23a1 100644 --- a/src/Applications/Applications/examples/v1.0/New-MgApplicationOwnerByRef.md +++ b/src/Applications/Applications/examples/v1.0/New-MgApplicationOwnerByRef.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Add an owner to an application -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} + $NewOwner = @{ + "@odata.id"= "https://graph.microsoft.com/v1.0/directoryObjects/{075b32dd-edb7-47cf-89ef-f3f733683a3f}" + } -{{ Add output here }} +New-MgApplicationOwnerByRef -ApplicationId 'f6b30057-7095-4e2c-89f8-224149f591b7' -BodyParameter $NewOwner ``` -{{ Add description here }} - +In this example, the first command defines the value for the $NewOwner variable. The second command adds the new owner to the specified application. diff --git a/src/Applications/Applications/examples/v1.0/New-MgServicePrincipal.md b/src/Applications/Applications/examples/v1.0/New-MgServicePrincipal.md index 093355d11d5..6681c5ad0db 100644 --- a/src/Applications/Applications/examples/v1.0/New-MgServicePrincipal.md +++ b/src/Applications/Applications/examples/v1.0/New-MgServicePrincipal.md @@ -1,18 +1,16 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Create a new service principal object -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$ServicePrincipalID=@{ + "AppId" = "fc876dd1-6bcb-4304-b9b6-18ddf1526b62" + } +New-MgServicePrincipal -BodyParameter $ServicePrincipalId | + Format-List id, DisplayName, AppId, SignInAudience -{{ Add output here }} +Id : ac483a5f-f291-4499-8a62-058547724579 +DisplayName : Example App +AppId : ffdf268a-2fe2-49e1-8cd7-66ecb61641ec +SignInAudience : AzureADandPersonalMicrosoftAccount ``` -{{ Add description here }} - +In this example, the first command defines the service principal object in the variable $ServiceprincipalId. The second command creates a new service principal object. diff --git a/src/Applications/Applications/examples/v1.0/New-MgUserAppRoleAssignment.md b/src/Applications/Applications/examples/v1.0/New-MgUserAppRoleAssignment.md index 093355d11d5..0b50b0d2263 100644 --- a/src/Applications/Applications/examples/v1.0/New-MgUserAppRoleAssignment.md +++ b/src/Applications/Applications/examples/v1.0/New-MgUserAppRoleAssignment.md @@ -1,18 +1,20 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Assign a user an application role -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +New-MgUserAppRoleAssignment -Userid '8a7c50d3-fcbd-4727-a889-8ab232dfea01' ` + -PrincipalId '8a7c50d3-fcbd-4727-a889-8ab232dfea01' ` + -ResourceId '0873169c-9595-4664-9d02-499b49846ff1' ` + -AppRoleID '00000000-0000-0000-0000-000000000000' | + Format-List Id, AppRoleId, CreationTime, PrincipalDisplayName, + PrincipalId, PrincipalType, ResourceDisplayName, ResourceId -{{ Add output here }} +Id : 01B8ir38J0eoiYqyMt_qAWev_PSoYDBGmcqI9E2dyKI +AppRoleId : 00000000-0000-0000-0000-000000000000 +PrincipalDisplayName : Adele Vance +PrincipalId : 8a7c50d3-fcbd-4727-a889-8ab232dfea01 +PrincipalType : User +ResourceDisplayName : dxprovisioning-analytics +ResourceId : 0873169c-9595-4664-9d02-499b49846ff1 ``` -{{ Add description here }} - +This commands assigns the specified user a role in the specified application resource. diff --git a/src/Applications/Applications/examples/v1.0/Remove-MgUserAppRoleAssignment.md b/src/Applications/Applications/examples/v1.0/Remove-MgUserAppRoleAssignment.md index 093355d11d5..2ddb9b5ebf7 100644 --- a/src/Applications/Applications/examples/v1.0/Remove-MgUserAppRoleAssignment.md +++ b/src/Applications/Applications/examples/v1.0/Remove-MgUserAppRoleAssignment.md @@ -1,18 +1,9 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Remove a user's application role assignment -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Remove-MgUserAppRoleAssignment ` +-AppRoleAssignmentID '01B8ir38J0eoiYqyMt_qAVDX9vgSB6xDur4zn5zOluM' ` +-UserId '8a7c50d3-fcbd-4727-a889-8ab232dfea01' ``` -{{ Add description here }} - +This example removes the specified application role from the specified user. diff --git a/src/Applications/Applications/examples/v1.0/Update-MgApplication.md b/src/Applications/Applications/examples/v1.0/Update-MgApplication.md index 093355d11d5..60e61c5ae2d 100644 --- a/src/Applications/Applications/examples/v1.0/Update-MgApplication.md +++ b/src/Applications/Applications/examples/v1.0/Update-MgApplication.md @@ -1,18 +1,9 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Update an application -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Update-MgApplication ` + -ApplicationId 'f6b30057-7095-4e2c-89f8-224149f591b7' ` + -DisplayName 'Testing App' ``` -{{ Add description here }} - +This example updates the specified application's display name. diff --git a/src/Applications/Applications/examples/v1.0/Update-MgServicePrincipal.md b/src/Applications/Applications/examples/v1.0/Update-MgServicePrincipal.md index 093355d11d5..4d3899870ca 100644 --- a/src/Applications/Applications/examples/v1.0/Update-MgServicePrincipal.md +++ b/src/Applications/Applications/examples/v1.0/Update-MgServicePrincipal.md @@ -1,18 +1,12 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Update the properties of a service principal -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$ServicePrincipalUpdate =@{ + "accountEnabled" = "true" + "appRoleAssignmentRequired" = "true" + } -{{ Add output here }} +Update-MgServicePrincipal -ServicePrincipalId '000e4269-1923-4c8c-9c27-1206e114d421' -BodyParameter $ServicePrincipalUpdate ``` -{{ Add description here }} - +This is example, the first command defines the properties and their values in a hashtable under the variable $ServicePrincipalUpdate. The second command updates the specified service principal. diff --git a/src/Groups/Groups/examples/v1.0-beta/Get-MgGroupOwner.md b/src/Groups/Groups/examples/v1.0-beta/Get-MgGroupOwner.md index 093355d11d5..994013cbfe6 100644 --- a/src/Groups/Groups/examples/v1.0-beta/Get-MgGroupOwner.md +++ b/src/Groups/Groups/examples/v1.0-beta/Get-MgGroupOwner.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get an owner of a group -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgGroupOwner -GroupId '4d5f57a1-85e0-41dd-8282-ff995ad5e1c3' -{{ Add output here }} +Id DeletedDateTime +-- --------------- +5fc5c052-8774-4258-8705-0b4ab3e9a2df ``` -{{ Add description here }} - +This example gets the owner of the specified group. diff --git a/src/Groups/Groups/examples/v1.0-beta/New-MgGroupOwnerByRef.md b/src/Groups/Groups/examples/v1.0-beta/New-MgGroupOwnerByRef.md index 093355d11d5..b3f4153a1c3 100644 --- a/src/Groups/Groups/examples/v1.0-beta/New-MgGroupOwnerByRef.md +++ b/src/Groups/Groups/examples/v1.0-beta/New-MgGroupOwnerByRef.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Add an owner to a group -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$newGroupOwner =@{ + "@odata.id"= "https://graph.microsoft.com/v1.0/users/{4de19c17-6a28-4a91-86d1-f717c3c8c229}" + } -{{ Add output here }} +New-MgGroupOwnerByRef -GroupId '1cb7317c-9c49-4dc8-a358-67ad8e95217c' -BodyParameter $newGroupOwner ``` -{{ Add description here }} - +In this example, the first command defines the value of the $newGroupOwner variable. The second command creates the value is an owner of the specified group. diff --git a/src/Groups/Groups/examples/v1.0-beta/Update-MgGroup.md b/src/Groups/Groups/examples/v1.0-beta/Update-MgGroup.md index 093355d11d5..a640c8d1826 100644 --- a/src/Groups/Groups/examples/v1.0-beta/Update-MgGroup.md +++ b/src/Groups/Groups/examples/v1.0-beta/Update-MgGroup.md @@ -1,18 +1,13 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Update the properties of a group -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$GroupUpdate= @{ + "Description"= "This is a test group" + "DisplayName"= "Test Group 1" -{{ Add output here }} +Update-MgGroup -GroupId '74a7bfca-7fbc-4a67-b4bb-3ef115b114f1' + -BodyParameter $GroupUpdate ``` -{{ Add description here }} - +In this example, the first command defines a list of all properties that need to be updated and assign then the new values in the variable $GroupUpdate . +The second command updates the properties of the group specified by the GroupId. diff --git a/src/Groups/Groups/examples/v1.0/Get-MgGroupOwner.md b/src/Groups/Groups/examples/v1.0/Get-MgGroupOwner.md index 093355d11d5..994013cbfe6 100644 --- a/src/Groups/Groups/examples/v1.0/Get-MgGroupOwner.md +++ b/src/Groups/Groups/examples/v1.0/Get-MgGroupOwner.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get an owner of a group -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgGroupOwner -GroupId '4d5f57a1-85e0-41dd-8282-ff995ad5e1c3' -{{ Add output here }} +Id DeletedDateTime +-- --------------- +5fc5c052-8774-4258-8705-0b4ab3e9a2df ``` -{{ Add description here }} - +This example gets the owner of the specified group. diff --git a/src/Groups/Groups/examples/v1.0/New-MgGroupOwnerByRef.md b/src/Groups/Groups/examples/v1.0/New-MgGroupOwnerByRef.md index 093355d11d5..b3f4153a1c3 100644 --- a/src/Groups/Groups/examples/v1.0/New-MgGroupOwnerByRef.md +++ b/src/Groups/Groups/examples/v1.0/New-MgGroupOwnerByRef.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Add an owner to a group -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$newGroupOwner =@{ + "@odata.id"= "https://graph.microsoft.com/v1.0/users/{4de19c17-6a28-4a91-86d1-f717c3c8c229}" + } -{{ Add output here }} +New-MgGroupOwnerByRef -GroupId '1cb7317c-9c49-4dc8-a358-67ad8e95217c' -BodyParameter $newGroupOwner ``` -{{ Add description here }} - +In this example, the first command defines the value of the $newGroupOwner variable. The second command creates the value is an owner of the specified group. diff --git a/src/Groups/Groups/examples/v1.0/Update-MgGroup.md b/src/Groups/Groups/examples/v1.0/Update-MgGroup.md index 093355d11d5..a640c8d1826 100644 --- a/src/Groups/Groups/examples/v1.0/Update-MgGroup.md +++ b/src/Groups/Groups/examples/v1.0/Update-MgGroup.md @@ -1,18 +1,13 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Update the properties of a group -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$GroupUpdate= @{ + "Description"= "This is a test group" + "DisplayName"= "Test Group 1" -{{ Add output here }} +Update-MgGroup -GroupId '74a7bfca-7fbc-4a67-b4bb-3ef115b114f1' + -BodyParameter $GroupUpdate ``` -{{ Add description here }} - +In this example, the first command defines a list of all properties that need to be updated and assign then the new values in the variable $GroupUpdate . +The second command updates the properties of the group specified by the GroupId. diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgContact.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgContact.md index 093355d11d5..ef0efe55e13 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgContact.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgContact.md @@ -1,18 +1,12 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Retrieve contact objects in the directory -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgContact | Format-List Id, DisplayName, Mail, MailNickname -{{ Add output here }} +Id : 5d58402b-3cb2-4b17-b913-299a72c84204 +DisplayName : Bob Kelly (TAILSPIN) +Mail : bobk@tailspintoys.com +MailNickname : BobKTAILSPIN ``` -{{ Add description here }} - +This example retrieves all contact objects in the directory. diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDirectoryRoleMember.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDirectoryRoleMember.md index 093355d11d5..9abc2d13814 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDirectoryRoleMember.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDirectoryRoleMember.md @@ -1,18 +1,15 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get member from directory roles -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Get-MgDirectoryRoleMember -DirectoryRoleId 'c6bb44c1-73cc-48a1-a73c-b6a977084948' + +Id DeletedDateTime +-- --------------- +68550c41-18a3-495e-aa1d-cf628c171b48 +f890ceed-822a-4647-8748-73d88013ae9d +5d5dff7a-d9cd-4bd3-a585-3d0ebbd58b69 +5fc5c052-8774-4258-8705-0b4ab3e9a2df +7425a698-2aa8-4333-9352-04f52e3a4c9d ``` -{{ Add description here }} - +This example gets the members of a directory role. diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDomain.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDomain.md index 093355d11d5..c3544679971 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDomain.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/Get-MgDomain.md @@ -1,18 +1,26 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get a list of domaim objects -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgDomain | Format-List -{{ Add output here }} +AuthenticationType : Managed +AvailabilityStatus : +DomainNameReferences : +Id : contoso.com +IsAdminManaged : True +IsDefault : True +IsInitial : True +IsRoot : True +IsVerified : True +Manufacturer : +Model : +PasswordNotificationWindowInDays : 14 +PasswordValidityPeriodInDays : 2147483647 +ServiceConfigurationRecords : +State : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDomainState +SupportedServices : {Email, OfficeCommunicationsOnline} +VerificationDnsRecords : +AdditionalProperties : {[@odata.context, https://graph.microsoft.com/v1.0/$metadata#domains/$entity]} ``` -{{ Add description here }} - +This example retrieves a list of the domain objects. diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/New-MgDirectoryRoleMemberByRef.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/New-MgDirectoryRoleMemberByRef.md index 093355d11d5..715c47fb3cd 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/New-MgDirectoryRoleMemberByRef.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0-beta/New-MgDirectoryRoleMemberByRef.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Add a member to a diretory role -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$DirObject = @{ + "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/3d939dc2-d0a0-4d4d-b3f4-6bb75ce6ff6e" + } -{{ Add output here }} +New-MgDirectoryRoleMemberByRef -DirectoryRoleId 'c6bb44c1-73cc-48a1-a73c-b6a977084948' -BodyParameter $DirObject ``` -{{ Add description here }} - +The first command sets the value for the directory object variable $DirObject. The second command assigns the defined directory object the directory role defined by the DirectoryRoleId diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgContact.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgContact.md index 093355d11d5..ef0efe55e13 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgContact.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgContact.md @@ -1,18 +1,12 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Retrieve contact objects in the directory -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgContact | Format-List Id, DisplayName, Mail, MailNickname -{{ Add output here }} +Id : 5d58402b-3cb2-4b17-b913-299a72c84204 +DisplayName : Bob Kelly (TAILSPIN) +Mail : bobk@tailspintoys.com +MailNickname : BobKTAILSPIN ``` -{{ Add description here }} - +This example retrieves all contact objects in the directory. diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDirectoryRoleMember.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDirectoryRoleMember.md index 093355d11d5..9abc2d13814 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDirectoryRoleMember.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDirectoryRoleMember.md @@ -1,18 +1,15 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get member from directory roles -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Get-MgDirectoryRoleMember -DirectoryRoleId 'c6bb44c1-73cc-48a1-a73c-b6a977084948' + +Id DeletedDateTime +-- --------------- +68550c41-18a3-495e-aa1d-cf628c171b48 +f890ceed-822a-4647-8748-73d88013ae9d +5d5dff7a-d9cd-4bd3-a585-3d0ebbd58b69 +5fc5c052-8774-4258-8705-0b4ab3e9a2df +7425a698-2aa8-4333-9352-04f52e3a4c9d ``` -{{ Add description here }} - +This example gets the members of a directory role. diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDomain.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDomain.md index 093355d11d5..c3544679971 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDomain.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/Get-MgDomain.md @@ -1,18 +1,26 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get a list of domaim objects -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +Get-MgDomain | Format-List -{{ Add output here }} +AuthenticationType : Managed +AvailabilityStatus : +DomainNameReferences : +Id : contoso.com +IsAdminManaged : True +IsDefault : True +IsInitial : True +IsRoot : True +IsVerified : True +Manufacturer : +Model : +PasswordNotificationWindowInDays : 14 +PasswordValidityPeriodInDays : 2147483647 +ServiceConfigurationRecords : +State : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDomainState +SupportedServices : {Email, OfficeCommunicationsOnline} +VerificationDnsRecords : +AdditionalProperties : {[@odata.context, https://graph.microsoft.com/v1.0/$metadata#domains/$entity]} ``` -{{ Add description here }} - +This example retrieves a list of the domain objects. diff --git a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/New-MgDirectoryRoleMemberByRef.md b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/New-MgDirectoryRoleMemberByRef.md index 093355d11d5..d4e3db91d0f 100644 --- a/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/New-MgDirectoryRoleMemberByRef.md +++ b/src/Identity.DirectoryManagement/Identity.DirectoryManagement/examples/v1.0/New-MgDirectoryRoleMemberByRef.md @@ -1,18 +1,11 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Add a member to a diretory role -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$DirObject = @{ + "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/3d939dc2-d0a0-4d4d-b3f4-6bb75ce6ff6e" + } -{{ Add output here }} +New-MgDirectoryRoleMemberByRef -DirectoryRoleId 'c6bb44c1-73cc-48a1-a73c-b6a977084948' -BodyParameter $DirObject ``` -{{ Add description here }} - +The first command sets the value for the directory object variable $DirObject. The second command assigns the defined directory object the directory role defined by the DirectoryRoleId \ No newline at end of file diff --git a/src/Users/Users/examples/v1.0-beta/Get-MgUserDirectReport.md b/src/Users/Users/examples/v1.0-beta/Get-MgUserDirectReport.md index 093355d11d5..210d3b360db 100644 --- a/src/Users/Users/examples/v1.0-beta/Get-MgUserDirectReport.md +++ b/src/Users/Users/examples/v1.0-beta/Get-MgUserDirectReport.md @@ -1,18 +1,15 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get a user's direct reports -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Get-MgUserDirectReport -UserId '075b32dd-edb7-47cf-89ef-f3f733683a3f' + +Id DeletedDateTime +-- --------------- +185190a7-54f0-4892-add3-211c21327570 +f890ceed-822a-4647-8748-73d88013ae9d +58fcff93-a667-4c5f-bd43-372a43f446bc +8a7c50d3-fcbd-4727-a889-8ab232dfea01 +68906e46-27f9-4c5e-914b-b931696088fe ``` -{{ Add description here }} - +This example gets the direct reports for the specified user. diff --git a/src/Users/Users/examples/v1.0-beta/Set-MgUserManagerByRef.md b/src/Users/Users/examples/v1.0-beta/Set-MgUserManagerByRef.md index 093355d11d5..83256cff057 100644 --- a/src/Users/Users/examples/v1.0-beta/Set-MgUserManagerByRef.md +++ b/src/Users/Users/examples/v1.0-beta/Set-MgUserManagerByRef.md @@ -1,18 +1,13 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` - -{{ Add description here }} +### Example 1: Update a user's manager -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$NewManager = @{ + "@odata.id"="https://graph.microsoft.com/v1.0/users/075b32dd-edb7-47cf-89ef-f3f733683a3f" + } -{{ Add output here }} +Set-MgUserManagerByRef -UserId '8a7c50d3-fcbd-4727-a889-8ab232dfea01' -BodyParameter $NewManager ``` -{{ Add description here }} +In this example, the first command defines the new manager using the $NewManager variable with id `075b32dd-edb7-47cf-89ef-f3f733683a3f`. +The second command sets the manager for user defined by the UserId as the value provided on the $NewManager variable. diff --git a/src/Users/Users/examples/v1.0/Get-MgUserDirectReport.md b/src/Users/Users/examples/v1.0/Get-MgUserDirectReport.md index 093355d11d5..210d3b360db 100644 --- a/src/Users/Users/examples/v1.0/Get-MgUserDirectReport.md +++ b/src/Users/Users/examples/v1.0/Get-MgUserDirectReport.md @@ -1,18 +1,15 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` +### Example 1: Get a user's direct reports -{{ Add description here }} - -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} +Get-MgUserDirectReport -UserId '075b32dd-edb7-47cf-89ef-f3f733683a3f' + +Id DeletedDateTime +-- --------------- +185190a7-54f0-4892-add3-211c21327570 +f890ceed-822a-4647-8748-73d88013ae9d +58fcff93-a667-4c5f-bd43-372a43f446bc +8a7c50d3-fcbd-4727-a889-8ab232dfea01 +68906e46-27f9-4c5e-914b-b931696088fe ``` -{{ Add description here }} - +This example gets the direct reports for the specified user. diff --git a/src/Users/Users/examples/v1.0/Set-MgUserManagerByRef.md b/src/Users/Users/examples/v1.0/Set-MgUserManagerByRef.md index 093355d11d5..83256cff057 100644 --- a/src/Users/Users/examples/v1.0/Set-MgUserManagerByRef.md +++ b/src/Users/Users/examples/v1.0/Set-MgUserManagerByRef.md @@ -1,18 +1,13 @@ -### Example 1: {{ Add title here }} -```powershell -PS C:\> {{ Add code here }} - -{{ Add output here }} -``` - -{{ Add description here }} +### Example 1: Update a user's manager -### Example 2: {{ Add title here }} ```powershell -PS C:\> {{ Add code here }} +$NewManager = @{ + "@odata.id"="https://graph.microsoft.com/v1.0/users/075b32dd-edb7-47cf-89ef-f3f733683a3f" + } -{{ Add output here }} +Set-MgUserManagerByRef -UserId '8a7c50d3-fcbd-4727-a889-8ab232dfea01' -BodyParameter $NewManager ``` -{{ Add description here }} +In this example, the first command defines the new manager using the $NewManager variable with id `075b32dd-edb7-47cf-89ef-f3f733683a3f`. +The second command sets the manager for user defined by the UserId as the value provided on the $NewManager variable.