Running OnedriveMapper from a shortcut

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 🙂

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

10 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Greg
Greg
3 years ago

put this into “shell:common startup ” and only Progress Bar is showing. i love your solutions

Kevin De Schrijver
Kevin De Schrijver
3 years ago

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?

Matt Hinchy
Matt Hinchy
3 years ago

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?

Bart
Bart
3 years ago

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