0

I write a Programm that should call for Powershell scrirpts. I try to use the get-Creadential script but the gui does not open where you can enter the credentials

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim powerShell  = System.Management.Automation.PowerShell.Create()
    powerShell.AddScript("get-credential")
    powerShell.Invoke()

    If powerShell.HadErrors Then MsgBox("error")

End Sub

so in this case the msgbox opens :-) the error says that not all parameters entered that are needed for the script. But I want that it opens the credentials dialog that the user can enter the needed credentials. At the end I want to call another script from the VcCloud API that uses the scipt inside...

tire0011
  • 1,048
  • 1
  • 11
  • 22
  • 2
    http://stackoverflow.com/questions/1624417/powershell-how-do-i-get-credentials-from-c-sharp-code – CB. Sep 22 '15 at 08:30
  • maybe a workaround, but is there no way that you can call scripts that uses a gui? – tire0011 Sep 22 '15 at 12:44

0 Answers0