Stéphane Thirion
  • Home
  • Consulting – Raidho
  • homelab
3K
0
0
0
Stéphane Thirion
Stéphane Thirion
  • Home
  • Consulting – Raidho
  • homelab
  • Azure
  • Azure
  • PowerShell
  • Scripting
  • Security

Export all Admin Roles and members from Azure AD

  • March 25, 2021
  • Rodolphe Herpeux
Total
2
Shares
0
0
2
0
0
0
0

Hello everyone,

I share with you this PowerShell script that allows you to list all the groups of Azure AD roles as well as theirs members.

Source code   
  1. Param(
  2. [Parameter(Mandatory = $true)]
  3. [string]$TenantName
  4. )
  5. Connect-AzureAD
  6. $mycoll = @()
  7. $role = Get-AzureADDirectoryRole
  8. foreach ($r in $role) {
  9. $users = (Get-AzureADDirectoryRoleMember -ObjectId $r.ObjectId).UserPrincipalName
  10. foreach ($user in $users) {
  11. $u = Get-AzureADUser -Filter "UserPrincipalName eq '$user'"
  12. $row = New-Object System.Object
  13. $row | Add-Member -MemberType NoteProperty -Name "DirectoryRole" -Value $r.DisplayName
  14. $row | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $u.DisplayName
  15. $row | Add-Member -MemberType NoteProperty -Name "UserPrincipalName" -Value $u.UserPrincipalName
  16. $row | Add-Member -MemberType NoteProperty -Name "UserType" -Value $u.UserType
  17. $mycoll += $row
  18. }
  19. }
  20. $filepath = 'D:TempDirectoryRole'+$TenantName+'.csv'
  21. $mycoll | Export-Csv -Path $filepath -NoTypeInformation -Encoding UTF8 -Delimiter ";"
Total
2
Shares
Tweet 0
Share 0
Share 2
Share 0
Share 0
Share 0
Share 0
Rodolphe Herpeux

Previous Article
  • RDS
  • Security
  • Windows 2016

RDS access to applications with second authentication factor by smartcard

  • January 7, 2021
  • Rodolphe Herpeux
View Post
Next Article
  • ADC
  • Experience
  • Linux

Cloud yes but no, thanks (there is some Citrix)

  • December 7, 2021
  • Stephane Thirion
View Post
You May Also Like
View Post
  • Active Directory
  • ADC
  • Citrix
  • Citrix Virtual Apps and Desktops
  • DaaS
  • Microsoft
  • NetScaler
  • Security

Netscaler native OTP Active Directory account delegation

  • Stephane Thirion
  • March 22, 2023
View Post
  • Citrix
  • Citrix Virtual Apps and Desktops
  • Cloud
  • DaaS
  • Microsoft
  • PowerShell
  • VMware
  • vSphere

Create vmware service account for MCS Citrix

  • Stephane Thirion
  • February 28, 2023
View Post
  • RDS
  • Security
  • Windows 2016

RDS access to applications with second authentication factor by smartcard

  • Rodolphe Herpeux
  • January 7, 2021
View Post
  • ArchY.net Site
  • Azure
  • Citrix
  • Cloud
  • Experience
  • Microsoft
  • News
  • Office365
  • Raidho
  • VMware

Mettre en place une solution de travail à distance (RemoteOffice / Remoteworking) 2/2

  • Stephane Thirion
  • March 24, 2020
View Post
  • Amazon
  • Citrix
  • Cloud
  • Experience
  • Microsoft
  • News
  • Office365
  • Raidho
  • Security
  • VMware

Mettre en place une solution de travail à distance (RemoteOffice / Remoteworking) 1/2

  • Stephane Thirion
  • March 22, 2020
View Post
  • Citrix
  • Citrix Virtual Apps and Desktops
  • Microsoft
  • PowerShell
  • Scripting
  • Windows 2016
  • Windows 2019
  • XenApp
  • XenDesktop

Enable SSL on Citrix Virtual Apps and Desktops 1912(+) XML Service

  • Stephane Thirion
  • February 13, 2020
View Post
  • Azure
  • Azure
  • Citrix
  • Citrix Virtual Apps and Desktops
  • Cloud
  • Microsoft
  • Windows 2019
  • Windows Virtual Desktop

Microsoft, Citrix, 2019, 1808.2 etc…

  • Stephane Thirion
  • October 16, 2018
View Post
  • Experience
  • Microsoft
  • PowerShell
  • Scripting
  • Windows 2016
  • XenApp

XenApp Windows 2016 build report

  • Stephane Thirion
  • May 25, 2018
vmware
Binance – Affiliated link
Coinbase – Affiliated link
Blog Stats
  • 1,239,190 hits
Categories
  • Amazon (1)
  • Apple (20)
    • iOS (5)
    • Mac OSx (11)
  • ArchY.net Site (30)
  • Azure (8)
  • Certifications (3)
  • Citrix (211)
    • ADC (4)
    • Citrix Virtual Apps and Desktops (5)
    • DaaS (2)
    • NetScaler (15)
    • Password Manager (3)
    • Personal vDisk (5)
    • Power and Capacity Management (3)
    • Provisioning Services (22)
    • Receiver (29)
    • SDX (2)
    • ShareFile (8)
    • Single Sign On (3)
    • SmartAuditor (2)
    • Storefront (12)
    • Synergy (25)
    • User Profile Management (2)
    • VDI (7)
    • WebInterface (21)
    • XenApp (84)
    • XenApp Plugin (3)
    • XenClient (10)
    • XenDesktop (55)
    • XenServer (42)
  • Cloud (13)
  • Crystal Ball (2)
  • CTP (13)
  • Docker (2)
  • Events (35)
    • E2E – PubForum (9)
    • Geek Speak (3)
  • Experience (53)
  • Kubernetes (2)
  • Licensing (3)
  • Linux (12)
  • Microsoft (147)
    • Active Directory (1)
    • Azure (8)
    • Office365 (4)
    • PowerShell (19)
    • RDS (5)
    • Windows 10 (6)
    • Windows 2003 (21)
    • Windows 2008 (20)
    • Windows 2008 R2 (54)
    • Windows 2012 (13)
    • Windows 2012R2 (13)
    • Windows 2016 (18)
    • Windows 2019 (4)
    • Windows 2022 (1)
    • Windows 7 (27)
    • Windows 8 (19)
    • Windows Virtual Desktop (1)
    • Windows XP (11)
  • News (5)
  • Raidho (2)
  • Raspberry (3)
  • Scripting (13)
  • Security (5)
  • Slide Deck (1)
  • Thin Clients (3)
  • Twitter (1)
  • Ubiquiti (1)
  • Uncategorized (13)
  • VMware (28)
    • VMWare WorkStation (2)
    • vSphere (16)
Stéphane Thirion
Don't Follow the Trend

Input your search keywords and press Enter.