Link to home
Start Free TrialLog in
Avatar of TonyElam
TonyElam

asked on

C#. VB

Does anyone know of a way to convert the following PS code to C# or VB to create an exe file?



$password = get-content C:\cred1.txt | convertto-securestring

$credential = new-object -typename System.Management.Automation.PSCredential -argumentlist "admin",$password

#Use invoke-command to execute the operation#

Invoke-command –computername <computer>  -credential $credential –scriptblock {ftpuser}
ASKER CERTIFIED SOLUTION
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial