3

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?

2 Answers 2

6

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.

1
  • Thank you for this, I originally used another VBScript to access the same info, but this worked too.
    – f3tt
    May 13, 2013 at 15:28
0

If you don't have AD modules installed on your clients, You can use the WMI class as follows:

Get-CimInstance -ClassName Win32_NetworkLoginProfile | Select-Object -Property 
ScriptPath

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .