Using PPKG's ProvisioningCommands to invoke a script.

Posted by Vorox3@reddit | sysadmin | View on Reddit | 0 comments

Hello,

Attempted to post this on a company alt account, but it was too new.

I'm attempting to create a provisioning package and as part of it I want it to invoke a script on a flash drive to copy files to the new machine.

However, I cannot seem to get the .ppkg to actually run the script. I've verified the script runs on both my system with the same setup (script and files on flash drive, running the same invocation command as the .ppkg does).

Under ProvisioningCommands>PrimaryContext>CommandI have the follow steps:

Here is the contents of the CopyScripts.ps1 script, pretty bare bones:

Copy-Item -Path $PSScriptRoot -Destination "C:\CompanyName\ProvisioningFiles" -Recurse

I've looked through a few other posts and articles regarding similar issues, but I've yet to find a solution for this one. All the scripts check out when I test them, but I'm assuming there is something esoteric going once the provisioning package gets involved.

Anyone have any advice?