Skip to main content

Test-WtIntuneWin

Test if a package will install

Use the Windows Sandbox to test if the provided installer arguments will make it install silently and if it exists with the expected exit code.

Syntax

PackageFolder (default)

Test-WtIntuneWin -PackageFolder <String> [-InstallerArguments <String>] [-Clean] [-Sleep <Int32>]
ParameterReq.TypeDescription
-PackageFolderStringThe folder where the package is
-InstallerArgumentsStringOverride the installer arguments
-CleanSwitchClean the test files after run
-SleepInt32Sleep for x seconds before auto shutdown

IntuneWin

Test-WtIntuneWin -IntuneWinFile <String> [-InstallerFilename <String>] [-InstallerArguments <String>] [-Clean] [-Sleep <Int32>]
ParameterReq.TypeDescription
-IntuneWinFileStringThe IntuneWin file to test
-InstallerFilenameStringThe installer filename (if not set correctly inside the intunewin)
-InstallerArgumentsStringThe installer arguments (if you want it to execute silently)
-CleanSwitchClean the test files after run
-SleepInt32Sleep for x seconds before auto shutdown

WinGet

Test-WtIntuneWin -PackageId <String> -Version <String> -RootPackageFolder <String> [-Clean] [-Sleep <Int32>]
ParameterReq.TypeDescription
-PackageIdStringThe package id to upload to Intune.
-VersionStringThe version to upload to Intune
-RootPackageFolderStringThe Root folder where all the package live in.
-CleanSwitchClean the test files after run
-SleepInt32Sleep for x seconds before auto shutdown

Examples

Test OhMyPosh version 22.0.3

Test a packaged installer in sandbox

Test-WtIntuneWin -PackageFolder "D:\packages\JanDeDobbeleer.OhMyPosh\22.0.3"