Skip to main content

Deploy-WtWin32App

Create an Win32App in Intune and upload the .intunewin file. This is an authenticated command, so specify the parameters to authenticate.

Win32LobApp

Deploy-WtWin32App (basic)
Deploy-WtWin32App [-App] <Win32LobApp> [-IntuneWinFile] <String> [[-LogoPath] <String>] <AuthenticationParameters> [-ProgressAction <ActionPreference>] [<CommonParameters>]
ParameterReq.SampleDescription
-AppWin32LobApp object.
-IntuneWinFileThe location of the .intunewin file to upload.
-LogoPathThe location of the image to use a logo.
-GraphIdThe ID of the app that should be superseded by this app.
<Authentication>The authentication parameters.

WinGet

Deploy-WtWin32App (PackageId and Root Folder)
Deploy-WtWin32App [-PackageId] <String> [-Version] <String> [-RootPackageFolder] <String> <AuthenticationParameters> [-ProgressAction <ActionPreference>] [<CommonParameters>]
ParameterReq.SampleDescription
-PackageIdJanDeDobbeleer.OhMyPoshThe unique identifier of the package in the WinGet repository.
-Version19.19.0The version of the WinGet package you want to deploy.
-RootPackageFolderC:\packagesThe root folder where the packages live in.
-GraphIdThe ID of the app that should be superseded by this app.
<Authentication>The authentication parameters.

Deploy an app packaged by WinTuner. If you used the New-WtWingetPackage commandlet to create the package, there will be some metadata available to us that is needed to create the Win32App in Intune.

Folder

Deploy-WtWin32App (Folder)
Deploy-WtWin32App [-PackageFolder] <String> <AuthenticationParameters> [-ProgressAction <ActionPreference>] [<CommonParameters>]
ParameterReq.Description
-PackageFolderThe folder where this specific app was packaged to. eg. C:\packages\{PackageId}\{Version}
-GraphIdThe ID of the app that should be superseded by this app.
<Authentication>The authentication parameters.

Deploy an app packaged by WinTuner. If you used the New-WtWingetPackage commandlet to create the package, there will be some metadata available to us that is needed to create the Win32App in Intune.

Pipe from New-WtWingetPackage

One-liner package and deploy

You can use the output of the New-WtWingetPackage commandlet to directly pipe into the Deploy-WtWin32App commandlet. This allows a one-liner to package and deploy an app to Intune.

Package then deploy
New-WtWingetPackage -PackageId Jandedobbeleer.ohmyposh -PackageFolder "C:\packages\" | Deploy-WtWin32App -UseDefaultCredentials

New-WtWingetPackage outputs a WingetPackage object, which has the PackageFolder property set to C:\packages\{PackageId}\{Version}. Which is in turn picked up by the Deploy-WtWin32App commandlet.

Supersede an app

Since version v0.8.2 the Deploy-WtWin32App commandlet supports superseding an app. This means that the new app will replace the old one in Intune. This is done by specifying the GraphId of the app that should be superseded. Since version v0.8.4 this will also turn on auto update for the new app is the old app was assigned as available.

Supersede actions:

  1. Load the old app
  2. Update relationships of the new app to supersede the old app
  3. Copy categories from the old app to the new app
  4. Copy assignments from the old app to the new app (and change the assignments to auto update for all available assignments)
  5. Remove assignments from the old app

Outputs

The package will be created in the folder {PackageFolder}\{PackageId}\{Version}.

And the output of this command is a Win32LobApp object. You can use this object to further manipulate the app in Intune. Or to save the ID for later use.