Hi, I am trying to establish an implicit session with a remote host from my machine from a C# code. I am using runspace API for that. the code snippet is provided below Runspace runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); //constructing the vmname parameter here vmname = useralias ...
Ask Don Jones
Filed under: Test-Connection, Args, Parameter, scripts, PS Remoting, new-pssession, WMI, Remote PowerShell
We’ve been asked to monitor if a network/mapped drive is available. I did find I can see drive data using the gwmi & filter for the “DriveType” Gwmi Win32_LogicalDisk -filter "DriveType = 4" The output is: DeviceID : T: DriveType : 4 ProviderName : \\%host%\%sharename...