Copy Network Folder

Exponent0174
Exponent0174 Member, Managed Service Provider CHOCOLATE MILK

Hi, I'm trying to run a script for workstation deployments that copies down an introductory info folder for new users. I'm running it as a powershell script currently:

Copy-Item "\\[file_server\folder\subfolder]" -Destination "C:\Users\Public\Desktop\" -Recurse

Copying and pasting this script directly into the system shell in Live Connect works fine, but plugging it into a procedure using the executePowershell functions does not. Does anyone have any things I can try to get this working?

1
1 votes

Awaiting Votes · Last Updated

Comments

  • Tom Fehlberg
    Tom Fehlberg Outer Banks of North CarolinaMember, Managed Service Provider DECAF

    have you tried each of the 5 different execute powershell commands? Maybe it needs to be run as system ...

  • Exponent0174
    Exponent0174 Member, Managed Service Provider CHOCOLATE MILK

    Hi, thanks for the response. The initial version of the script was running as System in 64 bit. I just tried it with every powershell option at once, each one set to continue on fail, and it still doesn't work. The procedure log on the agent lists the script as running successfully.

    As an aside, do you happen to know the proper syntax for running an uploaded powershell script? Is it just the name or do I have to specify Private\scripts_folder\script_name.ps1?

  • Tom Fehlberg
    Tom Fehlberg Outer Banks of North CarolinaMember, Managed Service Provider DECAF

    You do have to specify the location of the script on the machine you are running it on ...

    As for the command failing, I am running into something similar on a script I am working on - I think it is related to specific things that run in interactive mode cannot be run from a Kaseya script directly, so the only 'real' answer is to create the PS Script or batch file, load that to the endpoint and then run that PS Script/batch file from the Kaseya script ...