covcreo
(mike young)
February 10, 2020, 6:29pm
1
I have a script that works well in power shell and want to add it in uipath. I do not have something right in uipath but it works native in power shell
THis is what I am running in powershell:
$Path = “c:\Temp”
$LogPath = “c:\temp”
Get-ChildItem $Path -force -Recurse | Select Name,@{Name=“Owner”;Expression={(Get-ACL $_.Fullname).Owner}} | Export-Csv $LogPath\FileFolderOwner.csv -NoTypeInformation
This is the error that I am getting.
error
Compiler error(s) encountered processing expression “”$Path = “c:\Temp”
$LogPath = “c:\temp”
Get-ChildItem $Path -force -Recurse | Select Name,@{Name=“Owner”;Expression={(Get-ACL $_.Fullname).Owner}} | Export-Csv $LogPath\FileFolderOwner.csv -NoTypeInformation"".
Character constant must contain exactly one character.
How do I get this to work?
covcreo
(mike young)
February 10, 2020, 7:16pm
2
the error is from running in UiPath invoke powershell
covcreo
(mike young)
February 11, 2020, 1:59pm
3
This resolves the issue. The correct way to invoke powershell
How to Integrate PowerShell with UiPath
This topic is a step by step guide for integrating Powershell with Uipath. There is an ‘Invoke Powershell Activity’ available in Uipath which can be used to run the powershell scripts.
For our example purpose, let us consider a simple powershell script which gives us the status of windows services on the machine. This script will have two input parameters:
• ServiceState (String) – To get the status of service. For e.g. ‘Running’ , ‘Stopped’ etc
• Outp…
2 Likes
system
(system)
Closed
February 14, 2020, 1:59pm
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.