I want to use a PowerShell script to automate tasks related to the user when the user logs in.
Sometimes a user will have moved his Documents folder from the default location. How can I determine the location of the user's Documents folder in PowerShell?
try this:
[Environment]::GetFolderPath("MyDocuments")