Skip to content

Commit

Permalink
1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
NickolajA committed Dec 21, 2023
1 parent c51d20a commit 6c5875b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion IntuneWin32App.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'IntuneWin32App.psm1'

# Version number of this module.
ModuleVersion = '1.4.2'
ModuleVersion = '1.4.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
8 changes: 6 additions & 2 deletions Private/Invoke-Executable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ function Invoke-Executable {

[parameter(Mandatory = $false, HelpMessage = "Specify arguments that will be passed to the executable.")]
[ValidateNotNull()]
[string]$Arguments
[string]$Arguments,

[parameter(Mandatory = $false, HelpMessage = "Specify whether standard output should be redirected.")]
[ValidateNotNull()]
[bool]$RedirectStandardOutput = $true
)
try {
# Create the Process Info object which contains details about the process
$ProcessStartInfoObject = New-object System.Diagnostics.ProcessStartInfo
$ProcessStartInfoObject.FileName = $FilePath
$ProcessStartInfoObject.CreateNoWindow = $true
$ProcessStartInfoObject.UseShellExecute = $false
$ProcessStartInfoObject.RedirectStandardOutput = $true
$ProcessStartInfoObject.RedirectStandardOutput = $RedirectStandardOutput
$ProcessStartInfoObject.RedirectStandardError = $true

# Add the arguments to the process info object
Expand Down
5 changes: 3 additions & 2 deletions Public/New-IntuneWin32AppPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ function New-IntuneWin32AppPackage {
Author: Nickolaj Andersen
Contact: @NickolajA
Created: 2020-01-04
Updated: 2023-09-04
Updated: 2023-12-13
Version history:
1.0.0 - (2020-01-04) Function created
1.0.1 - (2020-05-03) Added trimming of trailing backslashes passed to input paths to prevent unwanted errors
1.0.2 - (2023-01-23) Added Force parameter, function now also checks if an existing .intunewin file is present in the output folder and prompts accordingly
1.0.3 - (2023-09-04) Added Test-Path -LiteralPath conditional statements to all Test-Path instances
1.0.4 - (2023-12-13) Added RedirectStandardOutput parameter to allow for fix where IntuneWinAppUtil.exe wouldn't work when called from Invoke-Executable function
#>
[CmdletBinding(SupportsShouldProcess = $true)]
param(
Expand Down Expand Up @@ -101,7 +102,7 @@ function New-IntuneWin32AppPackage {
if ($ProcessPackage -eq $true) {
# Invoke IntuneWinAppUtil.exe with parameter inputs
Write-Verbose -Message "Invoking IntuneWinAppUtil.exe to initialize packaging process"
$PackageInvocation = Invoke-Executable -FilePath $IntuneWinAppUtilPath -Arguments "-c ""$($SourceFolder)"" -s ""$($SetupFile)"" -o ""$($OutPutFolder)"" -q"
$PackageInvocation = Invoke-Executable -FilePath $IntuneWinAppUtilPath -Arguments "-c ""$($SourceFolder)"" -s ""$($SetupFile)"" -o ""$($OutPutFolder)"" -q" -RedirectStandardOutput $false
if ($PackageInvocation.ExitCode -eq 0) {
Write-Verbose -Message "IntuneWinAppUtil.exe packaging process completed with exit code $($PackageInvocation.ExitCode)"

Expand Down
3 changes: 3 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release notes for IntuneWin32App module

## 1.4.3
- Updated the New-IntuneWin32AppPackage function to work properly after the latest version of the IntuneWinAppUtil.exe was recently updated.

## 1.4.2
- Improved the output from the `Get-IntuneWin32AppAssignment` function with new properties such as FilterID, FilterType, DeliveryOptimizationPriority, Notifications, RestartSettings and InstallTimeSettings. Also improved function to generate same type of output instead of different per parameter set. Fixed issue #108 related to the same function.
- All function of this module that requires the usage of an access token, has been updated to make use of the `Test-AccessToken` function, to ensure an eligible token is present.
Expand Down

0 comments on commit 6c5875b

Please sign in to comment.