Network Administration

System Administration
1) GettingLocalComputerInformation

SetobjComputer=CreateObject(“Shell.LocalMachine”)

Wscript.Echo“Computername:&objComputer.MachineName
Wscript.Echo
“Shutdownallowed:&objComputer.IsShutdownAllowed
Wscript.Echo
“FriendlyUIenabled:&objComputer.IsFriendlyUIEnabled
Wscript.Echo
“Guestaccessmode:&objComputer.IsGuestAccessMode
Wscript.Echo
“Guestaccountenabled:&_
    objComputer.IsGuestEnabled(0)
Wscript.Echo
“Multipleusersenabled:&_
    objComputer.IsMultipleUsersEnabled
Wscript.Echo
“Offlinefilesenabled:&_
    objComputer.IsOfflineFilesEnabled
Wscript.Echo
“Remoteconnectionsenabled:&_
    objComputer.IsRemoteConnectionsEnabled
Wscript.Echo
“Undockenabled:&objComputer.IsUndockEnabled

2) RestartaComputer

strComputer=“atl-dc-01″
Set
objWMIService=GetObject(“winmgmts:”_
    &“{impersonationLevel=impersonate,(Shutdown)}!\”&_
        strComputer&“rootcimv2″)

SetcolOperatingSystems=objWMIService.ExecQuery_
    (“Select*fromWin32_OperatingSystem”)

ForEachobjOperatingSystemincolOperatingSystems
    objOperatingSystem.Reboot()
Next

3) ShutDownaComputer

strComputer
=“.”
Set
objWMIService=GetObject_
    (“winmgmts:{impersonationLevel=impersonate,(Shutdown)}\”&_
        strComputer&“rootcimv2″)

SetcolOperatingSystems=objWMIService.ExecQuery_
    (“Select*fromWin32_OperatingSystem”)

For
EachobjOperatingSystemincolOperatingSystems
    objOperatingSystem.Win32Shutdown(1)
Next

 
4) ModifySystemStartupDelay

strComputer=“.”
Set
objWMIService=GetObject(“winmgmts:”_
    &“{impersonationLevel=impersonate}!\”&strComputer&“rootcimv2″)

SetcolStartupCommands=objWMIService.ExecQuery_
    (“Select*fromWin32_ComputerSystem”)

ForEachobjStartupCommandincolStartupCommands
    objStartupCommand.SystemStartupDelay=10
    objStartupCommand.Put_
Next

 

Comments