I started testing Package Factory and i already like it, good job guys.
But I noticed several issues in the code that i wanted to let you know about, along with some observations.
I was having issues with cert authentication when using a self-signed cert in Powershell 5.1, but not in v7. I understand it's out of your scope though, as described in this issue of MSAL.PS:
https://github.com/AzureAD/MSAL.PS/issues/15
When the Factory picks up the presence of Deploy-Application.ps1 and includes PSADT into intunewin package, the Install and Uninstall commands are written as if Install.ps1 script was used.
Test-IntuneWin32App takes 3 mins to complete which was annoying when testing, I had to just disable it.
Unfortunately PSADT integration is lacking, I'd expect the Factory to be able to automatically produce Deploy-Application.ps1 based on app json data. I already have the code that can do that and that I'm using elsewhere if you're interested.
I started testing Package Factory and i already like it, good job guys. But I noticed several issues in the code that i wanted to let you know about, along with some observations.
Why do you have PSEdition=Desktop as a hard requirement? I had to remove it before i was able to even test on Powershell v7. https://github.com/aaronparker/packagefactory/blob/8e2672a89a471d79e14cb5e0c2ca9738a4d7fccd/New-Win32Package.ps1#L1 https://github.com/aaronparker/packagefactory/blob/8e2672a89a471d79e14cb5e0c2ca9738a4d7fccd/scripts/Create-Win32App.ps1#L1
I was having issues with cert authentication when using a self-signed cert in Powershell 5.1, but not in v7. I understand it's out of your scope though, as described in this issue of MSAL.PS: https://github.com/AzureAD/MSAL.PS/issues/15
In the documentation you're saying that "Path" parameter of
New-Win32Package.ps1
"defaults to the same directory as where New-Win32Package.ps1 is located". However in the code you have a different default. https://github.com/aaronparker/packagefactory/blob/8e2672a89a471d79e14cb5e0c2ca9738a4d7fccd/New-Win32Package.ps1#L84New-Win32Package.ps1
doesn't honour "WorkingPath" parameter in all cases, specificallyCreate-Win32App.ps1
is downloading an icon into the script root (which was a problem for me when i tested inside Windows Sandbox and the folder was readonly). https://github.com/aaronparker/packagefactory/blob/8e2672a89a471d79e14cb5e0c2ca9738a4d7fccd/scripts/Create-Win32App.ps1#L54When using PSAppDeployToolkit, copying of Deploy-Application.ps1 to the Files folder (because $SourcePath points to Files at that point) of PSADT is completely unnecessary.
Exclude = "Deploy-Application.ps1"
should do. https://github.com/aaronparker/packagefactory/blob/8e2672a89a471d79e14cb5e0c2ca9738a4d7fccd/New-Win32Package.ps1#L230-L237When the Factory picks up the presence of Deploy-Application.ps1 and includes PSADT into intunewin package, the Install and Uninstall commands are written as if Install.ps1 script was used.
Lack of consistency between msg and the code here https://github.com/aaronparker/packagefactory/blob/8e2672a89a471d79e14cb5e0c2ca9738a4d7fccd/New-Win32Package.ps1#L351-L352 and here https://github.com/aaronparker/packagefactory/blob/8e2672a89a471d79e14cb5e0c2ca9738a4d7fccd/New-Win32Package.ps1#L355-L362
It works in Powershell v7 with no issues so far.
What i didn't like
Test-IntuneWin32App takes 3 mins to complete which was annoying when testing, I had to just disable it.
Unfortunately PSADT integration is lacking, I'd expect the Factory to be able to automatically produce Deploy-Application.ps1 based on app json data. I already have the code that can do that and that I'm using elsewhere if you're interested.