2
0
Files
PowershellScripts/Azure/User-Management/README.md

32 lines
1.1 KiB
Markdown

# 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
# Load all modules in your current memory
. .\Export-EntraActiveUsers.ps1
. .\UpdateEntraUsersDynamic.ps1
```
## 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
```