Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Usability] Cmdlet renaming #1205

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
# ------------------------------------------------------------------------------
function Add-EntraAdministrativeUnitMember {
function New-EntraAdministrativeUnitMember {
[CmdletBinding(DefaultParameterSetName = '')]
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
# ------------------------------------------------------------------------------
function Add-EntraScopedRoleMembership {
function New-EntraScopedRoleMembership {
[CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')]
param (
[Alias("ObjectId")]
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, HelpMessage = "The Unique ID of the administrative unit.")]
[System.String] $AdministrativeUnitId,
[Parameter(ParameterSetName = "InvokeByDynamicParameters")]
[System.String] $RoleObjectId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Related Links

[Add-EntraBetaScopedRoleMembership](Add-EntraBetaScopedRoleMembership.md)
[New-EntraBetaScopedRoleMembership](New-EntraBetaScopedRoleMembership.md)

[Remove-EntraBetaScopedRoleMembership](Remove-EntraBetaScopedRoleMembership.md)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Add-EntraBetaScopedRoleMembership
description: This article provides details on the Add-EntraBetaScopedRoleMembership command.
title: New-EntraBetaScopedRoleMembership
description: This article provides details on the New-EntraBetaScopedRoleMembership command.


ms.topic: reference
Expand All @@ -12,12 +12,12 @@ author: msewaweru

external help file: Microsoft.Graph.Entra.Beta-Help.xml
Module Name: Microsoft.Graph.Entra.Beta
online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership
online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaScopedRoleMembership

schema: 2.0.0
---

# Add-EntraBetaScopedRoleMembership
# New-EntraBetaScopedRoleMembership

## Synopsis

Expand All @@ -26,7 +26,7 @@ Assign a Microsoft Entra role with an administrative unit scope.
## Syntax

```powershell
Add-EntraBetaScopedRoleMembership
New-EntraBetaScopedRoleMembership
-AdministrativeUnitId <String>
[-RoleMemberInfo <RoleMemberInfo>]
[-RoleObjectId <String>]
Expand All @@ -35,9 +35,11 @@ Add-EntraBetaScopedRoleMembership

## Description

The `Add-EntraBetaScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership.
The `New-EntraBetaScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership.

For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role.
In delegated scenarios, the signed-in user must have either a supported Microsoft Entra role or a custom role with the necessary permissions. The minimum roles required for this operation are:

- Privileged Role Administrator

## Examples

Expand All @@ -50,7 +52,7 @@ $role = Get-EntraBetaDirectoryRole -Filter "DisplayName eq 'Helpdesk Administrat
$administrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq 'Pacific Administrative Unit'"
$roleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo
$roleMember.Id = $user.Id
Add-EntraBetaScopedRoleMembership -AdministrativeUnitId $administrativeUnit.Id -RoleObjectId $role.Id -RoleMemberInfo $roleMember
New-EntraBetaScopedRoleMembership -AdministrativeUnitId $administrativeUnit.Id -RoleObjectId $role.Id -RoleMemberInfo $roleMember
```

```Output
Expand Down Expand Up @@ -125,6 +127,8 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Notes

`Add-EntraBetaScopedRoleMembership` is an alias for `New-EntraBetaScopedRoleMembership`.

## Related Links

[Get-EntraBetaScopedRoleMembership](Get-EntraBetaScopedRoleMembership.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Related Links

[Add-EntraBetaScopedRoleMembership](Add-EntraBetaScopedRoleMembership.md)
[New-EntraBetaScopedRoleMembership](New-EntraBetaScopedRoleMembership.md)

[Get-EntraBetaScopedRoleMembership](Get-EntraBetaScopedRoleMembership.md)
6 changes: 2 additions & 4 deletions module/docs/entra-powershell-beta/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@
href: Microsoft.Graph.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md
- name: Add-EntraBetaLifecyclePolicyGroup
href: Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup.md
- name: Add-EntraBetaScopedRoleMembership
href: Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership.md
- name: New-EntraBetaScopedRoleMembership
href: Microsoft.Graph.Entra.Beta/New-EntraBetaScopedRoleMembership.md
- name: Add-EntraBetaServicePrincipalDelegatedPermissionClassification
href: Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md
- name: Add-EntraBetaScopedRoleMembership
href: Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership.md
- name: Add-EntraBetaServicePrincipalOwner
href: Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalOwner.md
- name: Add-EntraBetaServicePrincipalPolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Related Links

[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md)
[New-EntraAdministrativeUnitMember](New-EntraAdministrativeUnitMember.md)

[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md)
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Related Links

[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md)
[New-EntraScopedRoleMembership](New-EntraScopedRoleMembership.md)

[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Add-EntraAdministrativeUnitMember
description: This article provides details on the Add-EntraAdministrativeUnitMember command.
title: New-EntraAdministrativeUnitMember
description: This article provides details on the New-EntraAdministrativeUnitMember command.


ms.topic: reference
Expand All @@ -12,12 +12,12 @@ author: msewaweru

external help file: Microsoft.Graph.Entra-Help.xml
Module Name: Microsoft.Graph.Entra
online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember
online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAdministrativeUnitMember

schema: 2.0.0
---

# Add-EntraAdministrativeUnitMember
# New-EntraAdministrativeUnitMember

## Synopsis

Expand All @@ -26,19 +26,21 @@ Adds an administrative unit member.
## Syntax

```powershell
Add-EntraAdministrativeUnitMember
New-EntraAdministrativeUnitMember
-RefObjectId <String>
-AdministrativeUnitId <String>
[<CommonParameters>]
```

## Description

The `Add-EntraAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member.
The `New-EntraAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member.

Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions.

To add a user, group, or device to an administrative unit, the calling principal must be assigned at least the Privileged Role Administrator Microsoft Entra role.
To add a user, group, or device to an administrative unit, the calling principal must be assigned at least one of the following roles:

- Privileged Role Administrator

## Examples

Expand All @@ -48,7 +50,7 @@ To add a user, group, or device to an administrative unit, the calling principal
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$administrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
$user = Get-EntraUser -UserId '[email protected]'
Add-EntraAdministrativeUnitMember -AdministrativeUnitId $administrativeUnit.Id -RefObjectId $user.Id
New-EntraAdministrativeUnitMember -AdministrativeUnitId $administrativeUnit.Id -RefObjectId $user.Id
```

This example demonstrates adding an administrative unit member. Use `Get-EntraAdministrativeUnit` to find the administrative unit ID and `Get-EntraUser` to find the user ID.
Expand Down Expand Up @@ -100,8 +102,12 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Notes

`Add-EntraAdministrativeUnitMember` is an alias for `New-EntraAdministrativeUnitMember`.

## Related Links

[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md)

[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md)

[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Add-EntraScopedRoleMembership
description: This article provides details on the Add-EntraScopedRoleMembership command.
title: New-EntraScopedRoleMembership
description: This article provides details on the New-EntraScopedRoleMembership command.

ms.topic: reference
ms.date: 06/26/2024
Expand All @@ -10,12 +10,12 @@ manager: CelesteDG

external help file: Microsoft.Graph.Entra-Help.xml
Module Name: Microsoft.Graph.Entra
online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership
online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraScopedRoleMembership

schema: 2.0.0
---

# Add-EntraScopedRoleMembership
# New-EntraScopedRoleMembership

## Synopsis

Expand All @@ -24,7 +24,7 @@ Assign a Microsoft Entra role with an administrative unit scope.
## Syntax

```powershell
Add-EntraScopedRoleMembership
New-EntraScopedRoleMembership
-AdministrativeUnitId <String>
[-RoleObjectId <String>]
[-RoleMemberInfo <RoleMemberInfo>]
Expand All @@ -33,9 +33,11 @@ Add-EntraScopedRoleMembership

## Description

The `Add-EntraScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership.
The `New-EntraScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership.

For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role.
In delegated scenarios, the signed-in user must have either a supported Microsoft Entra role or a custom role with the necessary permissions. The minimum roles required for this operation are:

- Privileged Role Administrator

## Examples

Expand All @@ -48,7 +50,7 @@ $role = Get-EntraDirectoryRole -Filter "DisplayName eq 'Helpdesk Administrator'"
$administrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq 'Pacific Administrative Unit'"
$roleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo
$roleMember.Id = $user.Id
Add-EntraScopedRoleMembership -AdministrativeUnitId $administrativeUnit.Id -RoleObjectId $role.Id -RoleMemberInfo $roleMember
New-EntraScopedRoleMembership -AdministrativeUnitId $administrativeUnit.Id -RoleObjectId $role.Id -RoleMemberInfo $roleMember
```

```Output
Expand Down Expand Up @@ -123,6 +125,8 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Notes

`Add-EntraScopedRoleMembership` is an alias for `New-EntraScopedRoleMembership`.

## Related Links

[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Related Links

[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md)
[New-EntraAdministrativeUnitMember](New-EntraAdministrativeUnitMember.md)

[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar

## Related Links

[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md)
[New-EntraScopedRoleMembership](New-EntraScopedRoleMembership.md)

[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md)
8 changes: 4 additions & 4 deletions module/docs/entra-powershell-v1.0/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
href: Microsoft.Graph.Entra/Add-EntraGroupMember.md
- name: Add-EntraGroupOwner
href: Microsoft.Graph.Entra/Add-EntraGroupOwner.md
- name: Add-EntraAdministrativeUnitMember
href: Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember.md
- name: New-EntraAdministrativeUnitMember
href: Microsoft.Graph.Entra/New-EntraAdministrativeUnitMember.md
- name: Add-EntraApplicationOwner
href: Microsoft.Graph.Entra/Add-EntraApplicationOwner.md
- name: Add-EntraLifecyclePolicyGroup
href: Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup.md
- name: Add-EntraScopedRoleMembership
href: Microsoft.Graph.Entra/Add-EntraScopedRoleMembership.md
- name: New-EntraScopedRoleMembership
href: Microsoft.Graph.Entra/New-EntraScopedRoleMembership.md
- name: Add-EntraServicePrincipalOwner
href: Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner.md
- name: Confirm-EntraDomain
Expand Down
Loading