$uninstallgroup = New-MgGroup -DisplayName $adgroupuninstall -Description "Uninstall group for $name" -SecurityEnabled -MailEnabled:$false -MailNickName "group" $installgroup = New-MgGroup -DisplayName $adgroupinstall -Description "Install group for $name" -SecurityEnabled -MailEnabled:$false -MailNickName "group" Headers to create the other variables $detection2 = $detection -split '='Ĭreate the Azure AD groups $groupname1 = $name + "-INSTALL" $iconname = $iconpath.Substring($iconpath.LastIndexOf("/") + 1) In the case of the icon, we also need the file name and path to save to $icon2 = $icon -split '=' If (Get-Module -ListAvailable -Name powershell-yaml) įor each variable we have created, we need to split on the “=” to grab the value I am also unloading any current AzureAD modules to make sure the preview one is used #Install MS Graph if not available Usage: add-winget-package -yamlfile First up, we need to install and import 3 modules: Powershell-YAML, IntuneWin32App and AzureADPreview (all as current user to avoid any pesky admin rights restrictions). You can also download from PSGallery to make it quicker to deploy apps Install-Script -Name add-winget-package Using a custom manifest of course means the same can be deployed to multiple tenants, but with only one manifest to update with new app versions!Īs always, the raw script is on Github and an example manifest is available here. Create the YAML, run the script and deploy, easy as that. This one takes a custom Winget YAML manifest, extracts the juicy details and creates a Win32 app, assignment groups, detection methods, uploads and assigns. Some thanks first, this script has come together with some help from others įirst up, Niels Kok for his excellent Packaging Script which gave me inspiration for this oneĪlso to Nickolaj Andersen and his Intune module which does a lot of the work on this oneĪnd Phil Jorgensen for his wizardry in getting Winget to work in the System context For anyone in an environment with multiple customers, packaging, configuring and deploying the same app multiple times seems such a waste of valuable time, especially when having to do so with every update too!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |