Simple method to run logon / recurring scripts in Intune!

%3CLINGO-SUB%20id%3D%22lingo-sub-686861%22%20slang%3D%22en-US%22%3ESimple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686861%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22s116kyp-0%20dlYVYC%22%3E%3CDIV%20class%3D%22_1hLrLjnE1G_RBCNcN9MVQf%22%3E%3CSPAN%3EHappy%20to%20share%20my%20latest%20Intune%20script%20%3A)%3C%2Fimg%3E%20It%20%3CSTRONG%3Edoes%20not%20use%20scheduled%20tasks%3C%2FSTRONG%3E%20and%20allows%20you%20set%20a%20recurring%20time%20for%20the%20script%20to%20rerun%20and%2For%20just%20to%20run%20at%20every%20logon%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22_3xX726aBn29LDbsDtzr_6E%20s116kyp-6%20oTBHR%22%3E%3CDIV%20class%3D%22s1wwjaac-0%20blXjFh%22%3E%3CP%20class%3D%22rz6fp9-10%20himKiy%22%3E%3CA%20href%3D%22https%3A%2F%2Fwww.lieben.nu%2Fliebensraum%2F2019%2F06%2Fsimplify-logon-scripts-in-intune-without-schedules%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.lieben.nu%2Fliebensraum%2F2019%2F06%2Fsimplify-logon-scripts-in-intune-without-schedules%2F%3C%2FA%3E%3C%2FP%3E%3CP%20class%3D%22rz6fp9-10%20himKiy%22%3EThe%20advantage%20is%20that%20when%20you%3CSTRONG%3E%20unassign%20the%20script%20from%20a%20user%2C%20no%20scheduled%20task%20remains%3C%2FSTRONG%3E%20that%20ignorantly%20keeps%20running%20the%20script%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-686861%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-688521%22%20slang%3D%22en-US%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-688521%22%20slang%3D%22en-US%22%3EThanx%2C%20same%20as%20I%20do%20but%20I%20wrap%20it%20in%20an%20MSI.%20That%20way%20it%20is%20possible%20to%20monitor%20the%20deployment%2C%20Uninstall%20or%20upgrade%20if%20nescecary.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1166856%22%20slang%3D%22de-DE%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1166856%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F320165%22%20target%3D%22_blank%22%3E%40RobdeRoos%3C%2FA%3E%26nbsp%3BCould%20you%20share%20your%20solution%3F%20Joss%20script%20isn't%20working%20for%20me%20-%20it%20only%20runs%20once%20when%20deployed.%20Triple%20checked%20everything%20-%20no%20way%20to%20get%20it%20to%20run%20%3A-).%20%3CBR%20%2F%3EWould%20be%20cool%20to%20check%20out%20your%20solution.%3C%2FP%3E%3CP%3EThx%26nbsp%3B%3C%2FP%3E%3CP%3EWerner%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1168621%22%20slang%3D%22en-US%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1168621%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F553491%22%20target%3D%22_blank%22%3E%40Werner_Pertl%3C%2FA%3E%26nbsp%3BI%20use%20Advanced%20Installer%20to%20%22install%22%20the%20script%20to%20the%20program%20files%20folder%20and%20I%20create%20a%20shortcut%20that%20I%20place%20in%20the%20startup%20folder.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1169415%22%20slang%3D%22de-DE%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1169415%22%20slang%3D%22de-DE%22%3EWorks%20like%20a%20charm%20-%20simple%20and%20great%20solution!%20Thanks!%20Werner%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1597294%22%20slang%3D%22en-US%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1597294%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F553491%22%20target%3D%22_blank%22%3E%40Werner_Pertl%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20you%20just%20use%20the%20free%20version%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1597308%22%20slang%3D%22de-DE%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1597308%22%20slang%3D%22de-DE%22%3EYes%2C%20correct%20%3B)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1800559%22%20slang%3D%22en-US%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1800559%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F320165%22%20target%3D%22_blank%22%3E%40RobdeRoos%3C%2FA%3E%26nbsp%3BAfter%20I%20create%20an%20MSI%20package%20how%20do%20I%20get%20it%20to%20start%20every%20time%20someone%20logs%20in%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20I%20like%20the%20visibility%20your%20solution%20provides.%26nbsp%3B%20Also%20is%20it%20just%20more%20or%20can%20you%20only%20have%201%20script%20targeting%20a%20PC%20at%20a%20time%3F%26nbsp%3B%20This%20solution%20would%20be%20a%20work%20around%20for%20that.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20any%20feedback%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1801558%22%20slang%3D%22en-US%22%3ERE%3A%20Simple%20method%20to%20run%20logon%20%2F%20recurring%20scripts%20in%20Intune!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1801558%22%20slang%3D%22en-US%22%3EMake%20sure%20you%20place%20a%20shortcut%20to%20the%20script%20in%20the%20startup%20folder.%20I%20made%20a%20scriot%20with%20AutoIt%20and%20compiled%20that%20to%20an%20exe.%20The%20exe%20I%20place%20somewhere%20in%20program%20files%20ans%20the%20shortcuts%20to%20it%20lands%20in%20the%20startupfolder.%3C%2FLINGO-BODY%3E
Highlighted
Contributor
Happy to share my latest Intune script :) It does not use scheduled tasks and allows you set a recurring time for the script to rerun and/or just to run at every logon:

https://www.lieben.nu/liebensraum/2019/06/simplify-logon-scripts-in-intune-without-schedules/

The advantage is that when you unassign the script from a user, no scheduled task remains that ignorantly keeps running the script :)

8 Replies
Highlighted
Thanx, same as I do but I wrap it in an MSI. That way it is possible to monitor the deployment, Uninstall or upgrade if nescecary.
Highlighted

@RobdeRoos Could you share your solution? Joss script isn't working for me - it only runs once when deployed. Triple checked everything - no way to get it to run :-).
Would be cool to check out your solution.

Thx 

Werner

Highlighted

@Werner_Pertl I use Advanced Installer to "install" the script to the program files folder and I create a shortcut that I place in the startup folder.

Highlighted
Works like a charm - simple and great solution! Thanks! Werner
Highlighted

@Werner_Pertl 

 

Did you just use the free version?

Highlighted
Highlighted

@RobdeRoos After I create an MSI package how do I get it to start every time someone logs in?

 

  I like the visibility your solution provides.  Also is it just more or can you only have 1 script targeting a PC at a time?  This solution would be a work around for that.  

 

Thanks for any feedback

Highlighted
Make sure you place a shortcut to the script in the startup folder. I made a scriot with AutoIt and compiled that to an exe. The exe I place somewhere in program files ans the shortcuts to it lands in the startupfolder.