View User’s current logon script without domain admin rights

Is there a way to view which logon script is running for an AD user without having domain admin rights.

I’ve tried gpresult and it isn’t displaying any login/logoff scripts, but I believe the script is configured under the user’s Profile tab in AD Users&Computers.

Are there any events logged I could refer to, or does this logon script get stored locally by chance?

Answer

In PowerShell:

Import-Module ActiveDirectory
Get-ADUser MDMarra -Properties scriptpath | Select scriptpath

In cmd:

dsquery user -samID MDMarra | dsget user -loscr

This will return the path of the logon script set in the Profile tab of ADUC.

or

Just install ADUC on your workstation and look at the Profile tab for the user in question. You don’t need to be a domain admin to view objects in ADUC.


By default, you can view this attribute for all users in your domain without having Domain Admin rights.

Attribution
Source : Link , Question Author : f3tt , Answer Author : MDMarra

Leave a Comment