Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Run a Script Under Alternate CredentialsContent of Run a Script Under Alternate Credentials.vbsMD5 Hash: 19D87F1A4C6FA9AB49C4029BAD18142A |
||
Const WbemAuthenticationLevelPktPrivacy = 6
strComputer = "atl-ws-01" strNamespace = "root\cimv2" strUser = "Administrator" strPassword = "4rTGh2#1" Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = objwbemLocator.ConnectServer _ (strComputer, strNamespace, strUser, strPassword) objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy Set colItems = objWMIService.ExecQuery _ ("Select * From Win32_OperatingSystem") For Each objItem in ColItems Wscript.Echo strComputer & ": " & objItem.Caption Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |