Skip to content

ActiveDirectoryHelper

Description

PowerShell module for managing and automating tasks in Active Directory environments.

GitLab Repository

Features

  • Manage Active Directory users, groups, and permissions.
  • Automate user provisioning, deprovisioning, and updates.
  • Synchronize and replicate Active Directory objects.
  • Retrieve and manage user account details, including lockout status and password expiration.
  • Generate reports and logs for Active Directory objects.
  • Manage Remote Desktop settings and home drives.

Functions

User Management

  • New-User: Creates a new Active Directory user.
  • Disable-User: Disables an Active Directory user account.
  • ConvertTo-SoftUser: Converts a user to a "Soft User" by downgrading permissions and moving them to a specific OU.
  • Test-ADUserExists: Checks if an Active Directory user exists.
  • Get-ADUserLastLogonDate: Retrieves the last logon date for a user.

Group Management

  • New-L_ADMGroup: Creates a new L_ADM security group in Active Directory.
  • Remove-ADGroupsViaInEnUit: Removes group memberships for a user based on a reference user.
  • Get-ADMemberOf: Retrieves the groups a user is a member of.

Permission Management

  • Add-ADObjectNotes: Adds a note to an Active Directory object and logs the action.
  • Grant-ManagedByPermission: Grants "Managed By" permissions to a group.
  • Revoke-ManagedByPermission: Revokes "Managed By" permissions from a group.

Remote Desktop and Home Drive Management

  • Get-ADUserRemoteDesktopSettings: Retrieves Remote Desktop settings for a user.
  • Set-ADUserRemoteDesktopSettings: Configures Remote Desktop settings for a user.
  • New-HomeDrive: Creates a new home drive for a user.
  • Move-HDrive: Moves a user's home drive to a new location.

Synchronization and Testing

  • Wait-ForADReplication: Waits for Active Directory replication to complete.
  • Test-ADCredential: Validates Active Directory credentials.

Reporting and Utilities

  • Get-ADUserPasswordExpirationDate: Retrieves the password expiration date for a user.
  • Get-ADObjectNotes: Retrieves notes added to an Active Directory object.
  • Get-ADLockoutStatus: Checks the lockout status of a user.

Dependencies

  • Active Directory PowerShell module

Roadmap

  • Add more functions for advanced Active Directory automation.
  • Enhance reporting capabilities with additional data exports.
  • Integrate with other modules for broader automation workflows.

Changelog

  • 14/08/2019: Initial release of the module.
  • 31/03/2025: Updated functions and added new features.