Deploying Powershell script

Hello,

We are attempting to deploy folder with multiple files along with a powershell script that will uninstall a specific version of Office 365 and install Office 2019. My syntax is probably off here, any help is greatly appreciated.

prefetch a5fef0e4959547684708783755ef47d759cc5afc sha1:a5fef0e4959547684708783755ef47d759cc5afc size:5039473 http://servername:52311/Uploads/a5fef0e4959547684708783755ef47d759cc5afc/Crawford-Microsoft-Office-2019-x86.tmp sha256:aa685a253160491a5c39b67bd4cc8a6e10433402b523b9a65c756b41c59041c5
extract a5fef0e4959547684708783755ef47d759cc5afc

wait Powershell.exe -executionpolicy bypass .\invoke-installation.ps1

You probably want to call the folder and drop the . :

wait powershell.exe -executionpolicy remotesigned -File "{client folder of current site as string}\__Download\invoke-installation.ps1"

Thanks very much for the reply, this appears to have worked, however it ran silently. Normally that would be perfect but in this case we wanted some user interaction and allow them to begin the install. Is there different command syntax for that?

Yes, normally the BESClient executes processes using the LocalSystem account and cannot interact with the user’s desktop.

You can use ‘override’ commands to execute commands as the logged-on user, and to display the running window, but there are some other considerations to take into account there. For instance, both the installation source files and the running script need to be copied to a location the user can access (by default only Administrators have access to the ‘BES Client’ directory).

I summarized some of this in a Tip a few weeks ago, have a look at Tip - Action Override User settings for options to get started.