![]() If (1 -ne $Install.IsPresent + $Uninstall.What is a desktop wallpaper? When you boot your computer, there is an initial screen that comes up, in which your folders, documents, and software shortcuts are placed. #Check if the Install or Uninstall parameter was passed to the script #NOTE: We specify these individually so we can remove the background image using the same script #Get background file name and URL from Intune app installation parameter Fixed an issue with the script not downloading content in some scenarios in PoSh 5 by using the “UseBasicParsing” option for invoke-webrequest and changing how the Full URL is created. Exit code 0 indicates a successful deployment. I will tell the App to “Retry” if it sees an Exit code of 1. If the download fails I will set an Exit Code of 1. Intune also supports the use of the %AppData% variable when deploying an app in the User context – this makes our Detection Rule quite straight forward too. I will deploy it as a Win32 App in the user context so I can target the %AppData% Environment Variable. * You may not want your corporate Teams Background to sit on a Public URL so consider using Azure Active Directory Application Proxy to host the image. I will need to pass 3 parameters to my script. I will set an exit code in the script on download failure and tell Intune to retry the script again if it see’s that exit code (Intune will attempt 3 retires every 5mins if you specify an exit code to force a retry) The script attempts to download a file using the Invoke-WebRequest method and I liked the idea that I could get the Intune Management Extension to retry deployment if it failed. ![]() ![]() I also love the flexibility of using a Win32App to deploy my script. In order to achieve this, I would need to specify the image name and URL as a parameter in the installation command line. I should be able to create a new App in Intune and reuse the same Win32App again. I also didn’t want to have to re-write and re-package the script should I need to use it again. I wanted the solution to use a single script for both Install and Uninstall. Q: “Ben – So you can package only PowerShell scripts using the Win32 Content Prep tool without a payload?” – YES! “And the Script (disguised as an app) will appear in the Company Portal?” – YES! “And you can pass parameters to the installation command line meaning you won’t need to modify and re-package the script each time you copy it to create a new app in Intune?” YES! I will show you how we can retrieve background images from a URL and put them in the users profile to be used as a custom background in a Teams meeting. But I want to show you another way – a way which means you DON’T have to repackage scripts and images each time you want to send out a new background to your Teams users. Shall I just create a batch file and package it with an image using IntuneWinAppUtil to copy the image file to the users %AppData% folder? Sure – perfectly reasonable. There are many ways to cook this beast, was using Intune so I pondered. That is a cool feature right there – but as Admins we always ask “How do I automate this for my users? %AppData%\Microsoft\Teams\Backgrounds\Uploads The Next Level What some eagle eyed cherries started to realise is that you could add your own backgrounds to Teams by placing your background/s in the following folder Towards the end of March/beginning of April 2020 we were able to use custom backgrounds in our Microsoft Teams meetings – whaaaa I hear you cry! Microsoft announced a new background feature within Microsoft Teams. did a shout out on Twitter so I thought I’d bring this post forward and show you how you can deploy a PowerShell script from Intune to install a custom background for your Microsoft Teams users! Custom Backgrounds for Teams? This one has been in my blog queue for a while.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |