We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code doesn't work
The instructions to install winget in Windows Sandbox appear to no longer work.
install-winget.ps1
$progressPreference = 'silentlyContinue' Write-Host "Installing WinGet PowerShell module from PSGallery..." Install-PackageProvider -Name NuGet -Force | Out-Null Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null Write-Host "Using Repair-WinGetPackageManager cmdlet to bootstrap WinGet..." Repair-WinGetPackageManager Write-Host "Done."
Open a PowerShell Window
Run powershell -command "& {Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force}" to allow running the script
powershell -command "& {Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force}"
Run .\install-winget.ps1
.\install-winget.ps1
PS C:\Users\WDAGUtilityAccount\Desktop> powershell -command "& {Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force}" PS C:\Users\WDAGUtilityAccount\Desktop> .\install-winget.ps1 Installing WinGet PowerShell module from PSGallery... Microsoft.PowerShell.Management\Test-Connection : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:6146 char:22 + ... connected = Microsoft.PowerShell.Management\Test-Connection -Computer ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Test-Connection], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.TestConnectionCommand Microsoft.PowerShell.Management\Test-Connection : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:6146 char:22 + ... connected = Microsoft.PowerShell.Management\Test-Connection -Computer ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Test-Connection], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.TestConnectionCommand Using Repair-WinGetPackageManager cmdlet to bootstrap WinGet... Repair-WinGetPackageManager : The term 'Repair-WinGetPackageManager' 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\WDAGUtilityAccount\Desktop\install-winget.ps1:6 char:1 + Repair-WinGetPackageManager + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Repair-WinGetPackageManager:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Done. PS C:\Users\WDAGUtilityAccount\Desktop>
https://learn.microsoft.com/de-de/windows/package-manager/winget/#install-winget-on-windows-sandbox
https://github.com/MicrosoftDocs/windows-dev-docs/blob/docs/hub/package-manager/winget/index.md
@mattwojo
b49c32ea-2efa-b090-7123-87c31d10279b
The text was updated successfully, but these errors were encountered:
If I remove -Repository PSGallery from the script, it works again.
-Repository PSGallery
$progressPreference = 'silentlyContinue' Write-Host "Installing WinGet PowerShell module from PSGallery..." Install-PackageProvider -Name NuGet -Force | Out-Null -Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null +Install-Module -Name Microsoft.WinGet.Client -Force | Out-Null Write-Host "Using Repair-WinGetPackageManager cmdlet to bootstrap WinGet..." Repair-WinGetPackageManager Write-Host "Done."
Sorry, something went wrong.
No branches or pull requests
Type of issue
Code doesn't work
Feedback
The instructions to install winget in Windows Sandbox appear to no longer work.
Reproduction
install-winget.ps1
and copy the file into windows sandboxOpen a PowerShell Window
Run
powershell -command "& {Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force}"
to allow running the scriptRun
.\install-winget.ps1
Page URL
https://learn.microsoft.com/de-de/windows/package-manager/winget/#install-winget-on-windows-sandbox
Content source URL
https://github.com/MicrosoftDocs/windows-dev-docs/blob/docs/hub/package-manager/winget/index.md
Author
@mattwojo
Document Id
b49c32ea-2efa-b090-7123-87c31d10279b
The text was updated successfully, but these errors were encountered: