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?