In some cases, your users might not want to use OnedriveMapper as a logon script, but want to manually start it, or both.
Powershell execution policy, and generally the complexity involved for most users in starting scripts can be avoided by building a ‘smart’ shortcut to the script with the following line as the ‘target’:
%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -ExecutionPolicy ByPass -File “C:\Program Files (x86)\Lieben.nu\OnedriveMapper\OnedriveMapper_v3.17.ps1”
Obviously you’ll have to modify the path used there 🙂
put this into “shell:common startup ” and only Progress Bar is showing. i love your solutions
If I create a shortcut like this it briefly displays a command box and does nothing. If I copy and paste the target field in a command box the script runs as expected. Any bright ideas what would block the shortcut itself from running?
I am having problems running the OneDriveMapper – I keep getting: Failed to browse to the Office 365 Sign in page, this is a fatal error The interface is unknown. (Exception from HRESULT: 0x800706B5) – Any idea what I am doing wrong?
for me C:WindowsSystem32WindowsPowerShellv1.0powershell.exe is not working, but when i change it to %SystemRoot%system32WindowsPowerShellv1.0powershell.exe then it works. My Windows dit is just c:Windows.
Thanks for your great script