Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Collection of minor issues encountered #56

Open
obuolinis opened this issue Aug 9, 2024 · 0 comments
Open

A Collection of minor issues encountered #56

obuolinis opened this issue Aug 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@obuolinis
Copy link

obuolinis commented Aug 9, 2024

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.

  1. 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.

    #Requires -PSEdition Desktop

    #Requires -PSEdition Desktop

  2. 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:
    Get-MsalToken with Client Certificate fails on Windows PowerShell 5.1 AzureAD/MSAL.PS#15

  3. 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.

    [System.String] $Path = "E:\projects\packagefactory\packages",

  4. New-Win32Package.ps1 doesn't honour "WorkingPath" parameter in all cases, specifically Create-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).

    $OutFile = [System.IO.Path]::Combine($PSScriptRoot, $(Split-Path -Path $AppData.PackageInformation.IconFile -Leaf))

  5. When 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.

    $params = @{
    Path = "$([System.IO.Path]::Combine($AppPath, "Source"))\*"
    Destination = $SourcePath
    Recurse = $true
    Force = $true
    ErrorAction = "Stop"
    }
    Copy-Item @params

  6. 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.

  7. Lack of consistency between msg and the code here

    Write-Msg -Msg "Copy downloaded intunewin file to: '$Path\output'"
    Copy-Item -Path $Result.FullName -Destination $OutputPath -Force

    and here
    Write-Msg -Msg "Create intunewin package in: '$Path\output'"
    $params = @{
    SourceFolder = $SourcePath
    SetupFile = $Manifest.PackageInformation.SetupFile
    OutputFolder = $OutputPath
    Force = $true
    }
    $IntuneWinPackage = New-IntuneWin32AppPackage @params

  8. It works in Powershell v7 with no issues so far.

What i didn't like

  1. Test-IntuneWin32App takes 3 mins to complete which was annoying when testing, I had to just disable it.

  2. 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.

@aaronparker aaronparker added the enhancement New feature or request label Sep 4, 2024
@aaronparker aaronparker self-assigned this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants