To ensure consistency it is often desirable to run a script periodically to confirm all users are setup as expected. The following powershell script can help with obtaining ProfilePath, HomeDirectory and HomeDrive.

In an elevated (run as Administrator) powershell window run the following:
Get-ADUser -Filter 'enabled -eq $true' -Properties ProfilePath, HomeDirectory, HomeDrive | Select Name, SamAccountName, ProfilePath, HomeDirectory, HomeDrive

To export the list into a more convenient format such as CSV simply run the following:
Get-ADUser -Filter 'enabled -eq $true' -Properties ProfilePath, HomeDirectory, HomeDrive | Select Name, SamAccountName, ProfilePath, HomeDirectory, HomeDrive | Export-Csv -path "c:\temp\userlist.csv"

The above can be tweaked to get more properties as needed.

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Posts

  • Hello world!

    Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

  • Windows Server 2019 activation

    Steps: KMS activation keyshttps://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys

  • ExchangeOnlineManagement 3.1.0

    The Exchange Online Powershell V1 module is now deprecated. We need to use the Exchange OnlinePowershell V3 module instead. Command to install Modulehttps://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.1.0 Install-Module -Name ExchangeOnlineManagement…