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

Invoke-Executable issue? #19

Closed
MA-Jason-Coombes opened this issue Dec 4, 2023 · 3 comments
Closed

Invoke-Executable issue? #19

MA-Jason-Coombes opened this issue Dec 4, 2023 · 3 comments

Comments

@MA-Jason-Coombes
Copy link

Hi Andrew,

Please can you assit,

We've had some issues in our own pipeline regarding the new Content prep tool breaking the invoke command (microsoft/Microsoft-Win32-Content-Prep-Tool#111), I was wondering if this was the case with your script too as I'm doing some testing with it currently.

error in powershell terminal before the graph authentication hits:
; `+ Invoke-WebRequest -Uri $intuneapputilurl -OutFile $intuneapputiloutpu ...

  •   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], 
    

WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Invoke-WebRequest : The request was aborted: The connection was closed unexpectedly.
At C:\Users\Name\OneDrive - Company\Desktop\deploy-winget-win32-multiple.ps1:390 char:1

  • Invoke-WebRequest -Uri $intuneapputilurl -OutFile $intuneapputiloutpu ...
  •   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
      + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand`
    
    

Remediation gets created, groups get created but the ContentPrep tool doesn't create the .intunewin, I get this error after selecting "go" from the grid of applications (I selected Notepad++)

`. : The term 'c:\temp\934-2312041512\IntuneWinAppUtil.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At C:\Users\Name\OneDrive - Company\Desktop\deploy-winget-win32-multiple.ps1:2444 char:7

  • . $intuneapputiloutput -c "$apppath" -s "$setupfilename" -o "$app ...
    
  •   ~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (c:\temp\934-231...eWinAppUtil.exe:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException`

(Microsoft Windows NT 10.0.22631.0)
Host Application: C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe
Process ID: 20100
PSVersion: 5.1.22621.2506
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.2506
BuildVersion: 10.0.22621.2506
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1

Regards,
Jason

@andrew-s-taylor
Copy link
Owner

Looks like something is blocking you from downloading the intunewinapputil.exe. Unable to replicate issue

@lammy666
Copy link

lammy666 commented Dec 5, 2023

While not directly related to this, I have downloaded all the external downloads, modified the code to use a local copy of the file and wrapped it all up in the Intunewin file. This way there is no reliance on external downloads.

@andrew-s-taylor
Copy link
Owner

That's a good approach in restricted environments. I have the download in to ensure it's always getting the latest versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants