Throw : Unable to cast object of type 'System.String' to type 'System.Management.Automation.PSObject'

0 votes

I want to create a connection to remote desktop connection using UIPath. The connection is done using PowerShell.

It logs in to the remote server, but at the end, the UIPath gives me this error.

Can someone help me solve it?

It is linked to the input field.

The input of the PowerShell Activity:

  cmdkey /generic:TERMSRV/192.1.... /user:admin /pass:passs....
    mstsc /v:192.1.....
Jul 16, 2018 in RPA by wrecker
• 3,090 points
202 views

1 answer to this question.

0 votes

You have not posted your code, so here is what I used when I did it a while ago.

#Add Credential
cmdkey /generic:server01.contoso.com /user:contoso\userid /pass:Secretpassword

#run mstsc
mstsc -v server01.contoso.com
answered Jul 16, 2018 by Atul
• 5,530 points

Related Questions In RPA

0 votes
1 answer

Unable to cast object of type 'System.String' to type 'System.Management.Automation.PSObject'

#Add Credential cmdkey /generic:server01.contoso.com /user:contoso\userid /pass:Secretpassword #run mstsc mstsc -v ...READ MORE

answered Jul 11, 2018 in RPA by Vardy
• 2,280 points
226 views
0 votes
1 answer

Is it possible to convert a json string into a json Object using UiPath?

Rashmi, it's quite easy to convert a ...READ MORE

answered Mar 11 in RPA by Anvi
• 9,830 points
504 views
0 votes
1 answer

How to extract specific type of files from a directory using UiPath?

Hey @Avani, if you want to extract ...READ MORE

answered Mar 13 in RPA by Anvi
• 9,830 points
903 views
0 votes
1 answer

Unable to login to automation anywhere client?

Many people have been facing this issue ...READ MORE

answered Mar 14 in RPA by Iffath
• 1,180 points
3,557 views
0 votes
1 answer

UiPath - Citirx Automation

best way to do that is to ...READ MORE

answered Apr 13, 2018 in RPA by wrecker
• 3,090 points
163 views
0 votes
1 answer

UiPath - Web Scraping

Multiple solutions are listed below: Check your Selector Use ...READ MORE

answered Apr 13, 2018 in RPA by wrecker
• 3,090 points
133 views
0 votes
1 answer

Robot Manager in UiPath

the robot.exe file is located in: C:\Users\USER_ACCOUNT\AppData\Local\UiPath\app-17.1.6523\Ui-Robot.exe Hope it ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,090 points
297 views
0 votes
1 answer

Automation in Uipath

you can use the Database package for connecting  ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,090 points
251 views
0 votes
1 answer

Changing a specific column of an excel sheet in UiPath

You can use a For each row ...READ MORE

answered Jun 21, 2018 in RPA by Atul
• 5,530 points
164 views
0 votes
1 answer

How to go to next tab in windows GUI

You can send Ctrl + Tab for each tab. READ MORE

answered Jul 16, 2018 in RPA by Atul
• 5,530 points
67 views