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 🙂

10
Leave a Reply

avatar
4 Comment threads
6 Thread replies
4 Followers
 
Most reacted comment
Hottest comment thread
5 Comment authors
JosKevin De SchrijverMatt HinchyBartGreg Recent comment authors

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

  Subscribe  
newest oldest most voted
Notify of
Greg
Guest
Greg

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

Kevin De Schrijver
Guest
Kevin De Schrijver

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
Guest
Matt Hinchy

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
Guest
Bart

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