vbscript - VBS conversion to VB.NET -
The I change how VB.net and even write your own using WMI code All the tools have been tried to try. I LOGOFF a remote computer I am trying does not work with the shutdown-L / M at VBS script that currently work. ? Can anyone show me how to enter into VB.net for
strComputer = InputBox ( "machine name / IP address here ...") set objWMI = GetObject ( "winmgmts : {(shutdown)} \\ "+ strComputer +" \ root \ cimv2 ") set colOperatingSystems = objWMI.ExecQuery (" select colOperatingSystems ObjOperatingSystem.Win32Shutdown (0) for each objOperatingSystem in * ") from Win32_OperatingSystem Next
I try to generate the WMI code Creator of:
dim room as the new management (_ "\\ 192.168.1.105 \ root \ CIMV2") Scope.Connect () as a squared square E Mandnobjekt (Scope, _ New Manejmentpath ( "Win32_OperatingSystem.ReplaceKeyPropery = 'ReplaceKeyPropertyValue'"), _Nothing) in Mandnbejobjekt = _ classInstance.GetMethodParameters ( "Win32Shutdown_OperatingSystem as parameter for" receiving ") 'Add input par ameters. Perform in-house ("Flags") = 4 'method and get return value. << Code>
as managing Buzz object = _ classInstance.InvokeMethod ( "Win32Shutdown_OperatingSystem"
Comments
Post a Comment