Added extra parameters, fixed wildcard handling and comment exclusion, and added handling for .msp files #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed Wilcard bug - Removed wildcards surrounding $appName from Get-AppList, because previously, even without wildcards, it would return every app containing the same string which causes issues when -NoOGV is specified, since it would target all apps containing the $appName with no way to filter it. (Users can still add * to -AppName if they want to use wildcards)
Fixed ExcludePMPC bug - In Get-AppList the Get-CMApplication cmdlets were using $Pmpc_Comment (undefined) instead of $PmpcComment so when $ExcludePMPC was true, it would return nothing since it omits results containing '' (everything)
Added "-logFileName" parameter (defaults to 'Main.log') to New-Win32App to give the user the option to specify a custom log file name - When running multiple instances of the New-Win32App in the same working directory, it attempts to write to Main.log in parallel, causing all instances to throw a file in use error. This parameter is useful for creating different log files for each instance of the migration tool.
Added "-NoConsoleOutput" switch to New-Win32App - When specified it overrides Write-Host and Write-Progress to do nothing, still writes to a log file but does not show in console output
Added -Win32ContentPrepToolSilentMode switch to New-Win32App, when specified it appends "WindowStyle:Hidden" to Start-Process which runs IntuneWinAppUtil without opening a window - Since I was running a multi-threaded script, without this it would flood my screen with IntuneWinAppUtil windows while packaging apps
Added .msp handing in New-IntuneWin - Previously when building a intunewin file using a .msp installer, if it contained "msiexec.exe" (eg: msiexec.exe /p "example.msp" /qn) it would attempt to pass msiexec.exe into the IntuneWinAppUtil or if the install command contained just msiexec (eg: msiexec /p "example.msp" /qn) it would fail at "No matching extension found."