FAQ: Remove a role using PowerShell

Remove a role using PowerShell from Azure AD

John Savill

April 24, 2016

1 Min Read
FAQ: Remove a role using PowerShell

Q. How can I remove a role from a user or group using PowerShell?

A. To remove a role from a user or group using PowerShell the process is the same as for the assignment of a role except the Remove-AzureRmRoleAssignment cmdlet is used instead of New-AzureRmRoleAssignment cmdlet. For example:

$subGUID = "/subscriptions/" + (Get-AzureRmSubscription).SubscriptionIdGet-AzureRmRoleAssignmentRemove-AzureRmRoleAssignment -ObjectId "bc197389-c82d-48d7-a0e6-8e4cfc0861fc" -RoleDefinitionName "Website Contributor" -Scope $subGUID 

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like