2
0

User management functions

This commit is contained in:
2026-02-26 17:43:51 +01:00
parent ab125843ab
commit 797674d808
3 changed files with 191 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# User Management Modules
These script were written with the use of Gemini and are provided as is. Please test them before using anything in production
## Prerequisites
For running the Modules you need the MSGraph Powershell module installed. Use the command below to install it if not already present on your system
```
Install-Module -Name Microsoft.Graph
```
## Export Active user
Use the following commands to connect to the Graph APi and to export all active users including their attributes.
```
# Authenticate
Connect-MgGraph -Scopes "User.Read.All"
# Run the function with Verbose output to see progress
Export-EntraActiveUsers -Verbose
```
## Update Users
In order to update the users, change all attributes you want to change in the CSV and run the following commands. Change the path of the source file.
```
# Authenticate
Connect-MgGraph -Scopes "User.ReadWrite.All"
# Run the update with overwrite capability
Update-EntraUsersOverwrite -CsvPath "$PSScriptRoot\Exports\MasterUserList.csv" -Verbose
```