@gjacobse
You should just need to run this bit, nothing should have to be changed. DFL should be at least 2008
# Imports Active Directory information
Import-Module Activedirectory
$credentials = Get-Credential
# Prompts for user credentials default user is “ ”, enter an administrator account in the form of “domain-name\administrator-account”
Get-ADUser -Credential $credentials -Filter * -Properties DisplayName,EmailAddress,memberof,DistinguishedName,Enabled | % {
New-Object PSObject -Property @{
UserName = $_.DisplayName
EmailAddress = $_.EmailAddress
DistinguishedName = $_.DistinguishedName
Enabled = $_.Enabled
# Deliminates the document for easy copy and paste using ";" as the delimiter. Incredibly useful for Copy & Paste of group memberships to new hire employees.
Groups = ($_.memberof | Get-ADGroup | Select -ExpandProperty Name) -join ";"
}
# The export path is variable change to desired location on domain controller or end user computer.
} | Select UserName,EmailAddress,@{l='OU';e={$_.DistinguishedName.split(',')[1].split('=')[1]}},Groups,Enabled | Sort-Object Username | Export-Csv $ENV:UserProfile\Documents\User-Permissions.csv –NTI