本文介绍了使用C#进入Enter-pssession的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想知道如何使用C#代码执行enter-pssession命令.
我已经使用以下命令在Powershell控制台中运行它.
Hello All,
I would like to know how I can execute enter-pssession command using c# code.
I have used following command to run it in powershell console.
$secpasswd = ConvertTo-SecureString "123$" -AsPlainText -Force
$mycreds = New-object -typename System.Management.Automation.PSCredential("WIN-APRJ2923AV5.abc.com\Administrator",$secpasswd)
Enter-pssession 192.168.1.194 –credential $mycreds
但是我想使用c#代码来完成它,任何帮助将不胜感激.
问候
SEbastian
But I want to do it using c# code, any help would be appreciated.
Regards
SEbastian
推荐答案
这篇关于使用C#进入Enter-pssession的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!