Listing logon scripts dor AD users

Given a user in an Active Directory environment, I need to extract a list of all the logon scripts set by Group Policies for that user.
How can I get a list of all the login scripts assigned to the user by the various Group Policies assigned to the domain and to the OUs of which the user belongs?
Regards
marius

That’s REALLY tough.

You’re going to have to start by getting an RSOP (https://technet.microsoft.com/en-us/library/hh967453(v=wps.630).aspx) for the user.

Then, given the policies applied, you’ll have to get each one of them in turn and see what, if any, items are assigned to that logon script setting. https://technet.microsoft.com/en-us/library/ee461059.aspx

It’ll probably take a good bit of experimentation to get exactly what you want.

You can try the below command:

dsquery user -name * | dsget user -display -loscr > C:\users_script.txt

Please checkout the following articles.

http://www.oxfordsbsguy.com/2013/04/16/powershell-get-aduser-to-retrieve-logon-scripts-and-home-directories/