New-WtWingetPackage
Create an Intune package from a Winget package.
Basic usage
New-WtWingetPackage
New-WtWingetPackage [-PackageId] <String> [-PackageFolder] <String> [[-Version] <String>] [[-TempFolder] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Package OhMyPosh
New-WtWingetPackage -PackageId "Jandedobbeleer.ohmyposh" -PackageFolder "C:\packages"
The PackageId
is the unique identifier of the package in the WinGet repository, WinTuner will auto correct it to the correct casing.
The package will be created in C:\packages\{PackageId}\{version}
eg. C:\packages\JanDeDobbeleer.OhMyPosh\{version}
.
Parameters
Parameter | Req. | Sample | Description |
---|---|---|---|
-PackageId | ✅ | JanDeDobbeleer.OhMyPosh | The unique identifier of the package in the WinGet repository. |
-PackageFolder | ✅ | C:\packages | The root folder where the package should be created. |
-Version | 19.19.0 | The version of the WinGet package to package. | |
-TempFolder | C:\temp | Temp folder, default to {usersTempDir}\wintuner . |
Outputs
The package will be created in the folder {PackageFolder}\{PackageId}\{Version}
.
And the output of this command is a WingetPackage
object, which contains the following properties:
Property | Description |
---|---|
PackageId | The unique identifier of the package in the WinGet repository. |
Version | The version of the WinGet package to package. |
PackageFolder | The folder where the package is stored in. |
PackageFile | The filename of the .intunewin file. |
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.
See Deploy-WtWin32App for more information.