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 11, 2018 in RPA by Atul
• 5,530 points
534 views

1 answer to this question.

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

#run mstsc
mstsc -v server01.contoso.com
answered Jul 11, 2018 by Vardy
• 2,360 points

Related Questions In RPA

0 votes
1 answer

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

You have not posted your code, so ...READ MORE

answered Jul 16, 2018 in RPA by Atul
• 5,530 points
655 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, 2019 in RPA by Anvi
• 14,090 points
3,349 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, 2019 in RPA by Anvi
• 14,090 points
4,758 views
0 votes
1 answer

Unable to login to automation anywhere client?

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

answered Mar 14, 2019 in RPA by Iffath
• 1,180 points
4,465 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,110 points
377 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,110 points
527 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,110 points
706 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,110 points
593 views
0 votes
1 answer

Can i find the control type in UIPath?

There is no direct way of checking ...READ MORE

answered May 16, 2018 in RPA by Vardy
• 2,360 points
115 views
0 votes
1 answer

How to convert an array to arraylist?

import java.util.*; public class ArrToArrList { ...READ MORE

answered Jul 6, 2018 in RPA by Vardy
• 2,360 points
167 views