Log shutdown on win2k as

F

Fabio

hello all

does anyone knows how to log the shutdown on a Windows 2000 Advanced
Server?
e.g. "The previous shutdown at the 10.43 am 11/21/2005 was requested by
DOMAIN\USERNAME"

thanks in advance!
 
D

Dave Patrick

Use the Group policy editor to fire your script. You may need to read the
user name from;
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
DefaultDomainName and DefaultUserName

%systemroot%\system32\gpedit.msc
Computer Config\Windows Settings\Scripts\Startup/Shutdown

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| hello all
|
| does anyone knows how to log the shutdown on a Windows 2000 Advanced
| Server?
| e.g. "The previous shutdown at the 10.43 am 11/21/2005 was requested by
| DOMAIN\USERNAME"
|
| thanks in advance!
|
 
F

Fabio

Thanks a lot... do you think it'll work on all the open session used by
the terminal services service?

i mean, the key HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon DefaultDomainName and DefaultUserName are
used from the local user logged on or from all the users logged from
the terminal services?

Thanks a lot

Dave Patrick ha scritto:
 
D

Dave Patrick

Probably but I'd have to take a look after a TS session to be sure.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks a lot... do you think it'll work on all the open session used by
| the terminal services service?
|
| i mean, the key HKLM\SOFTWARE\Microsoft\Windows
| NT\CurrentVersion\Winlogon DefaultDomainName and DefaultUserName are
| used from the local user logged on or from all the users logged from
| the terminal services?
|
| Thanks a lot
 
F

Fabio

Thanks Dave, I've tried to make the script but I got some problems to
find the part that read the registry keys.
Can you please help me again?

Thanks a lot!

Dave Patrick ha scritto:
 
D

Dave Patrick

Dim WshShell, mydomain, myuser
Set WshShell = WScript.CreateObject("WScript.Shell")
mydomain = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\" _
& "Windows NT\CurrentVersion\Winlogon\DefaultDomainName")
myuser = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\" _
& "Windows NT\CurrentVersion\Winlogon\DefaultUserName")
Wscript.Echo "Domain= " & mydomain & "| User= " & myuser
Set WshShell = Nothing

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks Dave, I've tried to make the script but I got some problems to
| find the part that read the registry keys.
| Can you please help me again?
|
| Thanks a lot!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top