Month: April 2013

Not Found

Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.

Powershell script to get users profile path (RDS and Roaming)

Copy and paste the following into a powershell script.  Be sure to run this on a 2008R2 DC or equiv, or else the RDS profile is not available Import-Module ActiveDirectory Get-ChildItem -Filter “(&(objectclass=user)(objectcategory=user))” -Path ad:\”CN=Users,DC=horodc,DC=local” -Recurse | foreach { $user = [adsi]”LDAP://$($_.DistinguishedName)” $user | select @{N=”Name”; E={$_.name}}, @{N=”ProfilePath”; E={$_.profilepath}}, @{N=”RDSProfilePath”; E={$_.psbase.invokeget(“TerminalServicesProfilePath”)}} } | export-csv c:\test.csv

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> Uncategorized | Leave a comment