Part 3: Publishing the package as an artifact to a storage account ReferencesĪgain the link to the IntuneWin32App module.Not a big deal.this worked for me (just save it as. I hope you enjoyed reading this post about the Endpoint Manager Packaging Script. This is the code which performs these actions: We will package and upload the 7-zip application.įurthermore, I will show you the input code: $PackageType = "MSI"ĭ:\GIT\NKO\PSScripts\Intune\_IntuneDevOpsPackaging.ps1 -PackageType $PackageType `Ī lot less variables and arguments needed because the metadata which holds the install information is extracted from the MSI/Intunewin file. The output is exactly the same, only the package name differs. In addition, I will make this example shorter that the one before. This is assigned to the application in Intune.Ī cleanup job removes the packaging folder, this way your Pc/Agent stays clean. If it does not, a new group gets created. You get an authentication prompt for Azure AD:Īfter that, the script detects if the group exists or not. You get an authentication prompt for Microsoft Endpoint Manager: That package is uploaded to Microsoft Endpoint Manager. This should be the result in your Powershell Editor: In addition, this script only needs to return a 0 for Intune to detect it as succesfully.Īfter that, add the following code to the code above: PATHTOFILE\IntuneDevOpsPackaging.ps1 -PackageType $PackageType ` UnInstallArgs: Arguments to remove the application silently.ĭetectionArgs: Powershell code to detect the application. InstallArgs: Arguments to install the application silently. In the example, we use a new custom group. Furthermore, when a custom name is used, a new or existing Azure AD Group is assigned to the application. (Use accordingly)Īssignment: This can be All Users, All Devices or a Custom Name. TenantName: Name of your Microsoft 365 tenant. This is the packaging foldername and this is the name of the Intune Application.ĭownloadURL: The url where you can download the installer from. Package: This is the name of the application. In the case of Greenshot is an EXE type of application. PackageType: This is the type of application you want to install. $DetectionArgs = "Get-ChildItem 'C:\Program Files\Greenshot\Greenshot.exe'" $UninstallArgs = "TASKKILL /F /IM Greenshot.exe '%ProgramFiles%\Greenshot\unins000.exe' /VERYSILENT /NORESTART" Check out the link below:Īfter that, we need to define some variables: $PackageType = "EXE" Powershell Modules needed to create, upload and assign the package are installed automatically.Įndpoint Manager Packaging Script Syntaxis
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |