I have an opensource Powershell script, called OneDriveMapper.PS1, which literally maps a drive letter in Explorer to a OneDrive cloud storage. The easiest way to get end users to run the PS1 was to run it via a .bat file.
This is the content of that .bat file:
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& ‘S\path-to-script\OneDriveMapper_v1.ps1’”
Doing it this way means end users don’t have to deal with Powershell execution policies, etc.
I tried creating a procedure, to run this remotely hosted (on a mapped drive letter that points to a file server location) and while the procedure shows as having finished running on the endpoint, nothing happens.
This is what is in the procedure:
import os
os.system( ‘P:\Path-to-folder\ODriveMapper.bat’ )
Please can you help me with this?
Many thanks!