Script repository
Add managers of specific direct reports to a group
The script replaces the list of members of the target group with managers that currently have direct reports whose property is set to a specific value.
Updated on: Jan 18, 2026, Views: 4948
Add msExchCoManagedByLink values to Adaxes secondary owners
The script updates the adm-ManagedByList property with values of msExchCoManagedByLink.
Updated on: Jan 18, 2026, Views: 5054
Add user to a specific group if they are owners of at least one group
The script adds a user to a specific group if they are owners of at least one group.
Updated on: Jan 18, 2026, Views: 2
Check whether the initiator is owner of the target object OU
The script check whether the initiator is the owner of the OU where the target object is located.
Updated on: Jan 18, 2026, Views: 2663
Disabled managers with enabled direct reports
The script generates a report containing disabled user accounts that are managers of enabled user accounts.
Updated on: Jan 18, 2026, Views: 2082
Set manager based on property value
The script finds a user according to the property values mapping and sets the user as the manager of the target account.
Updated on: Jan 18, 2026, Views: 2395
Set manager for users in specific OUs
The script sets a user with a specific property value in a specific OU as manager of all other accounts in the OU.
Updated on: Jan 18, 2026, Views: 2967
Set manager of user as owner of Microsoft 365 groups owned by the user
The scripts find Microsoft 365 groups for which the target user is set as owner and sets the user manager as the groups owner.
Updated on: Jan 18, 2026, Views: 2533
Set owner of parent Organizational Unit as manager for user
The script sets the owner of the Organizational Unit where a user account is located as the user manager.
Updated on: Jan 18, 2026, Views: 2923
Transfer group ownership from target user to their manager
For all the groups owned (Managed By property) by the target user, the script changes the owner to the manager of the user.
Updated on: Jan 18, 2026, Views: 1191