LuckyLucks
asked on
connecting to remote server chosen dynamically
Hi
I am trying to coonect to a remote server from a local machine and all is working well.
However when I try to change the server name dynamically (user input) i.e instead of setting a hardcoded servername, I get an error saying you cant use a string for the System.Manageement.Managem entPath
dim dynamichost as string ="\\" & inputservername & "\root" & "\cimv2"
Dim oMs As New System.Management.Manageme ntScope(dy namichost, oConn)
It would work if I did Dim oMs As New System.Management.Manageme ntScope("\ \Server100 \root\cimv 2", oConn)
Please advise as to how I can get around to setting my servername dynamically!
Thanks
I am trying to coonect to a remote server from a local machine and all is working well.
However when I try to change the server name dynamically (user input) i.e instead of setting a hardcoded servername, I get an error saying you cant use a string for the System.Manageement.Managem
dim dynamichost as string ="\\" & inputservername & "\root" & "\cimv2"
Dim oMs As New System.Management.Manageme
It would work if I did Dim oMs As New System.Management.Manageme
Please advise as to how I can get around to setting my servername dynamically!
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER