PowerShell / PowerShellGallery

221 stars 61 forks source link

Install-Script -Name Get-WindowsAutopilotInfo throwing 404 error site down! HELP! #163

Closed jnsan413 closed 3 years ago

jnsan413 commented 3 years ago

WARNING: Could not get response from query 'https://www.powershellgallery.com/api/v2/items/psscript/package/Get-WindowsAutoPilotInfo/3.5'. WARNING: MSG:SourceLocationNotValid «https://www.powershellgallery.com/api/v2/items/psscript/» PackageManagement\Install-Package : Package 'Get-WindowsAutoPilotInfo' failed to install. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:3538 char:21

Get-WindowsAutopilotInfo.ps1 : The term 'Get-WindowsAutopilotInfo.ps1' 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 line:11 char:1

Cannot index into a null array. At line:17 char:1

Cannot index into a null array. At line:18 char:1

SydneyhSmith commented 3 years ago

Thanks @jnsan413 I am having trouble reproducing this-- are you still seeing this issue?

jnsan413 commented 3 years ago

Yes. below is the full PS script I am using. It was working perfectly last week PS C:\WINDOWS\system32> #Get Serial Number from BIOS $SerialNum = (Get-WmiObject win32_bios).SerialNumber

Script to get hardware hasH ID for Autopilot

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted -Force Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force Install-Script -Name Get-WindowsAutopilotInfo -Force $env:Path += ";C:\Program Files\WindowsPowerShell\Scripts"

Output hardware hasH ID

Get-WindowsAutopilotInfo.ps1 -OutputFile "C:\$SerialNum-AutopilotHWID.csv"

Add Autopilot Group Tag to .csv

$OrderID =@() $OrderID = Get-Content -Path "C:\$SerialNum-AutopilotHWID.csv"

$OrderID[0] = $OrderID[0] + ", Order ID" $OrderID[1] = $OrderID[1] + ",RISK-Autopilot Workstations" Set-Content -Path "C:\$SerialNum-AutopilotHWID.csv" -Value $OrderID -Encoding ASCII

Name Version Source Summary


nuget 2.8.5.201 https://onege... NuGet provider for the OneGet meta-package manager
WARNING: Could not get response from query 'https://www.powershellgallery.com/api/v2/items/psscript/package/Get-WindowsAutoPilotInfo/3 .5'. WARNING: MSG:SourceLocationNotValid «https://www.powershellgallery.com/api/v2/items/psscript/» PackageManagement\Install-Package : Package 'Get-WindowsAutoPilotInfo' failed to install. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:3538 char:21

Get-WindowsAutopilotInfo.ps1 : The term 'Get-WindowsAutopilotInfo.ps1' 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 line:11 char:1

Cannot index into a null array. At line:17 char:1

Cannot index into a null array. At line:18 char:1

PS C:\WINDOWS\system32>

SydneyhSmith commented 3 years ago

Could you try running this again with the verbose and debug flags? Install-Script -Name Get-WindowsAutopilotInfo -Force -Verbose -Debug , it would be great to also see the output of Get-PSRepository, $PSVersionTable, gmo PowerShellGet, PackageManagement -ListAvailable and Invoke-WebRequest 'https://www.powershellgallery.com/api/v2/'

jnsan413 commented 3 years ago

Apologies for the delay been away for a bit. Please see below Install-Script -Name Get-WindowsAutopilotInfo -Force -Verbose -Debug. I am not 100% sure how to get output of Get-PSRepository, $PSVersionTable, gmo PowerShellGet, PackageManagement -ListAvailable and Invoke-WebRequest 'https://www.powershellgallery.com/api/v2/'

PS C:\Windows\system32> #Get Serial Number from BIOS $SerialNum = (Get-WmiObject win32_bios).SerialNumber

Script to get hardware hasH ID for Autopilot

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted -Force Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force Install-Script -Name Get-WindowsAutopilotInfo -Force -Verbose -Debug $env:Path += ";C:\Program Files\WindowsPowerShell\Scripts"

Output hardware hasH ID

Get-WindowsAutopilotInfo.ps1 -OutputFile "C:\$SerialNum-AutopilotHWID.csv"

Add Autopilot Group Tag to .csv

$OrderID =@() $OrderID = Get-Content -Path "C:\$SerialNum-AutopilotHWID.csv"

$OrderID[0] = $OrderID[0] + ", Order ID" $OrderID[1] = $OrderID[1] + ",RISK-Autopilot Workstations" Set-Content -Path "C:\$SerialNum-AutopilotHWID.csv" -Value $OrderID -Encoding ASCII

Name Version Source Summary


nuget 2.8.5.201 https://onege... NuGet provider for the OneGet meta-package manager
DEBUG: Already prompted for the current scope:False DEBUG: After reading contents of PowerShellGetSettings.xml file, the Already prompted for the current scope:False VERBOSE: Added scripts installation location 'C:\Program Files\WindowsPowerShell\Scripts' for 'AllUsers' scope to PATH environment variable. VERBOSE: Added scripts installation location 'C:\Program Files\WindowsPowerShell\Scripts' for 'AllUsers' scope to process specific PATH environment variable. DEBUG: In Save-PSGetSettings, persisted the C:\Users\admin\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet\PowerShellGetSettings.xml file DEBUG: 00:00:00.0000003 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0000325 Force: True DEBUG: 00:00:00.0000445 Verbose: True DEBUG: 00:00:00.0000542 Debug: True DEBUG: 00:00:00.0000635 Name: Get-WindowsAutopilotInfo DEBUG: 00:00:00.0009161 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.0125566 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0307735 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0330695 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0330849 Force: True DEBUG: 00:00:00.0331149 Verbose: True DEBUG: 00:00:00.0331256 Debug: True DEBUG: 00:00:00.0331351 Name: Get-WindowsAutopilotInfo DEBUG: 00:00:00.0335945 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.0339604 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0355375 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0375360 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0375509 Force: True DEBUG: 00:00:00.0375601 Verbose: True DEBUG: 00:00:00.0375686 Debug: True DEBUG: 00:00:00.0375772 Name: Get-WindowsAutopilotInfo DEBUG: 00:00:00.0380535 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1 DEBUG: 00:00:00.0384222 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0439587 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0502030 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0502300 Force: True DEBUG: 00:00:00.0502478 Verbose: True DEBUG: 00:00:00.0502639 Debug: True DEBUG: 00:00:00.0502800 Name: Get-WindowsAutopilotInfo DEBUG: 00:00:00.0511724 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1 DEBUG: 00:00:00.0516909 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0551901 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.9507548 Calling SearchForPackages. Name='Get-WindowsAutopilotInfo' VERBOSE: Using the provider 'PowerShellGet' for searching packages. DEBUG: 00:00:00.9516027 PackageProvider::FindPackage with name Get-WindowsAutopilotInfo DEBUG: 00:00:00.9519987 Calling SearchForPackages After Select 1 DEBUG: 00:00:01.0118994 Calling New() : MethodName = 'FindPackage' DEBUG: 00:00:01.0159898 ProviderName: PowerShellGet DEBUG: 00:00:01.0165524 Type: Script DEBUG: 00:00:01.0170904 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:01.0177236 Force: True DEBUG: 00:00:01.0183147 Debug: True DEBUG: 00:00:01.0206571 Scope: AllUsers DEBUG: 00:00:01.0215954 Verbose: True DEBUG: 00:00:01.0220638 Name: Get-WindowsAutopilotInfo DEBUG: 00:00:01.0237469 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4 DEBUG: 00:00:01.1799381 In PowerShellGet Provider - 'Find-Package'. DEBUG: 00:00:03.1034899 Ping-Endpoint: location=https://go.microsoft.com/fwlink/?LinkID=397631&clcid=0x409, statuscode=200, resolvedLocation=https://www.powershellgallery.com/api/v2 DEBUG: 00:00:03.5161336 Ping-Endpoint: location=https://go.microsoft.com/fwlink/?LinkID=622995&clcid=0x409, statuscode=200, resolvedLocation=https://www.powershellgallery.com/api/v2/ items/psscript DEBUG: 00:00:03.6265281 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:03.6272798 OPTION: Type => Script DEBUG: 00:00:03.6278467 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:03.6284248 OPTION: Force => True DEBUG: 00:00:03.6546462 OPTION: Debug => True DEBUG: 00:00:03.6553692 OPTION: Scope => AllUsers DEBUG: 00:00:03.6560210 OPTION: Verbose => True DEBUG: 00:00:03.6567008 OPTION: Name => Get-WindowsAutopilotInfo VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/items/psscript' and PackageManagementProvider is 'NuGet'. DEBUG: 00:00:03.8005231 PackageProvider::FindPackage with name Get-WindowsAutopilotInfo DEBUG: 00:00:03.8164767 Calling 'NuGet'::'FindPackage' - name='Get-WindowsAutopilotInfo', requiredVersion='',minimumVersion='', maximumVersion='''. DEBUG: 00:00:03.8359112 Iterating 'Get-WindowsAutopilotInfo'. DEBUG: 00:00:03.8559173 Create directory 'C:\Users\admin\AppData\Roaming\NuGet'. DEBUG: 00:00:03.8756268 Create a file 'C:\Users\admin\AppData\Roaming\NuGet\nuget.config'. DEBUG: 00:00:03.9541025 Calling 'NuGetRequest'::'RegisteredPackageSources', 'C:\Users\admin\AppData\Roaming\NuGet\nuget.config'. DEBUG: 00:00:03.9555607 Loading a configuration from file 'C:\Users\admin\AppData\Roaming\NuGet\nuget.config'. DEBUG: 00:00:03.9569895 Loaded a configuration from file 'C:\Users\admin\AppData\Roaming\NuGet\nuget.config'. DEBUG: 00:00:03.9597799 There are '0' registered sources in 'NuGet' provider. DEBUG: 00:00:03.9608537 Source 'https://www.powershellgallery.com/api/v2/items/psscript' is not one of the registered sources in 'NuGet' provider. DEBUG: 00:00:04.3925837 Source 'https://www.powershellgallery.com/api/v2/items/psscript' is validated. DEBUG: 00:00:04.3968171 Calling 'NuGetRequest'::'GetPackageById', 'Get-WindowsAutopilotInfo'. DEBUG: 00:00:08.2855305 Calling 'HttpClientPackageRepository'::'FindPackagesById', 'Get-WindowsAutopilotInfo'. DEBUG: 00:00:08.2864886 Calling 'NuGetClient'::'FindPackage'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/items/psscript/FindPackagesById()?id='Get-WindowsAutopilotInfo'' for ''. DEBUG: 00:00:08.2969269 Downloading 'https://www.powershellgallery.com/api/v2/items/psscript/FindPackagesById()?id='Get-WindowsAutopilotInfo'&$skip=0&$top=40'. DEBUG: 00:00:08.6336634 Completed downloading 'https://www.powershellgallery.com/api/v2/items/psscript/FindPackagesById()?id='Get-WindowsAutopilotInfo'&$skip=0&$top=40'. DEBUG: 00:00:08.6360911 '21' packages recevied in the last request. VERBOSE: Total package yield:'1' for the specified package 'Get-WindowsAutopilotInfo'. DEBUG: 00:00:08.6597630 Completed iterating for 'Get-WindowsAutopilotInfo'. DEBUG: 00:00:08.8564145 Done calling powershell «Find-Package» «PSModule» DEBUG: 00:00:08.8677520 Calling New() : MethodName = 'GetInstalledPackages' DEBUG: 00:00:08.8682069 ProviderName: PowerShellGet DEBUG: 00:00:08.8685585 Type: Script DEBUG: 00:00:08.8689111 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:08.8692855 Force: True DEBUG: 00:00:08.8696288 Debug: True DEBUG: 00:00:08.8699699 Scope: AllUsers DEBUG: 00:00:08.8703436 Verbose: True DEBUG: 00:00:08.8706866 Name: Get-WindowsAutopilotInfo DEBUG: 00:00:08.8716654 INVOKING PowerShell Fn Get-InstalledPackage with args Get-WindowsAutoPilotInfo, 3.5, , that has length 4 DEBUG: 00:00:08.8793377 In PowerShellGet Provider - 'Get-InstalledPackage'. DEBUG: 00:00:08.8798238 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:08.8802773 OPTION: Type => Script DEBUG: 00:00:08.8807820 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:08.8812010 OPTION: Force => True DEBUG: 00:00:08.8816324 OPTION: Debug => True DEBUG: 00:00:08.8820498 OPTION: Scope => AllUsers DEBUG: 00:00:08.8824704 OPTION: Verbose => True DEBUG: 00:00:08.8829030 OPTION: Name => Get-WindowsAutopilotInfo DEBUG: 00:00:08.9118405 PowerShell Script 'PSModule' Function 'Get-InstalledPackage' returns null. DEBUG: 00:00:08.9129335 Done calling powershell «Get-InstalledPackage» «PSModule» DEBUG: 00:00:13.6428871 Calling New() : MethodName = 'InstallPackage' DEBUG: 00:00:13.6510730 ProviderName: PowerShellGet DEBUG: 00:00:13.6515356 Type: Script DEBUG: 00:00:13.6519880 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:13.6523942 Force: True DEBUG: 00:00:13.6528134 Debug: True DEBUG: 00:00:13.6532131 Scope: AllUsers DEBUG: 00:00:13.6536517 Verbose: True DEBUG: 00:00:13.6541038 Name: Get-WindowsAutopilotInfo DEBUG: 00:00:13.6554476 INVOKING PowerShell Fn Install-Package with args NuGet|Get-WindowsAutoPilotInfo|3.5|https://www.powershellgallery.com/api/v2/items/psscript|Script that has length 1 DEBUG: 00:00:13.6741536 In PowerShellGet Provider - 'Install-Package'. DEBUG: 00:00:13.7179031 In PowerShellGet Provider - 'Install-PackageUtility'. DEBUG: 00:00:13.7205660 The FastPackageReference is 'NuGet|Get-WindowsAutoPilotInfo|3.5|https://www.powershellgallery.com/api/v2/items/psscript|Script'. DEBUG: 00:00:13.7392917 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:13.7399565 OPTION: Type => Script DEBUG: 00:00:13.7407626 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:13.7569177 OPTION: Force => True DEBUG: 00:00:13.7575370 OPTION: Debug => True DEBUG: 00:00:13.7580837 OPTION: Scope => AllUsers DEBUG: 00:00:13.7585832 OPTION: Verbose => True DEBUG: 00:00:13.7591513 OPTION: Name => Get-WindowsAutopilotInfo VERBOSE: The installation scope is specified to be 'AllUsers'. DEBUG: 00:00:13.8119563 Already prompted for the current scope:True VERBOSE: The specified script will be installed in 'C:\Program Files\WindowsPowerShell\Scripts' and its dependent modules will be installed in 'C:\Program Files\WindowsPowerShell\Modules'. DEBUG: 00:00:13.8149566 ArtifactType is Script DEBUG: 00:00:13.8312394 InstalledScriptInfo is VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'. VERBOSE: Downloading script 'Get-WindowsAutoPilotInfo' with version '3.5' from the repository 'https://www.powershellgallery.com/api/v2/items/psscript'. DEBUG: 00:00:13.8456336 Calling 'NuGet'::'InstallPackage', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi9pdGVtcy9wc3NjcmlwdA==\R2V0LVdpbmRvd3NBdXRvUGlsb3RJbmZv\My41\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi9pdGVtcy9wc3NjcmlwdA=='. DEBUG: 00:00:13.8465708 Calling 'NuGetRequest'::'GetPackageByFastpath', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi9pdGVtcy9wc3NjcmlwdA==\R2V0LVdpbmRvd3NBdXRvUGlsb3RJbmZv\My41\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi9pdGVtcy9wc3Njc mlwdA=='. DEBUG: 00:00:13.8844692 Calling 'NuGetRequest'::'ResolvePackageSource', 'https://www.powershellgallery.com/api/v2/items/psscript'. DEBUG: 00:00:13.8860461 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2/items/psscript'. DEBUG: 00:00:13.8868530 Source 'https://www.powershellgallery.com/api/v2/items/psscript' is not one of the registered sources in 'NuGet' provider. DEBUG: 00:00:15.4711841 Calling 'HttpClientPackageRepository'::'FindPackage', 'Get-WindowsAutoPilotInfo'. DEBUG: 00:00:15.4718348 Calling 'NuGetClient'::'FindPackage'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/items/psscript/FindPackagesById()?id='Get-WindowsAutoPilotInfo'' for ''. DEBUG: 00:00:15.4744061 Downloading 'https://www.powershellgallery.com/api/v2/items/psscript/FindPackagesById()?id='Get-WindowsAutoPilotInfo'&$skip=0&$top=40'. DEBUG: 00:00:15.9919936 Completed downloading 'https://www.powershellgallery.com/api/v2/items/psscript/FindPackagesById()?id='Get-WindowsAutoPilotInfo'&$skip=0&$top=40'. DEBUG: 00:00:15.9935159 '21' packages recevied in the last request. DEBUG: 00:00:16.0036731 'Package version' is '3.5'. DEBUG: 00:00:16.0045075 'Request's Destination' is 'C:\Users\admin\AppData\Local\Temp\711970404'. DEBUG: 00:00:16.0064957 Calling 'NuGetClient'::'GetPackageDependencies'. DEBUG: 00:00:16.0089774 Returning the call 'NuGetClient'::'GetPackageDependencies'. DEBUG: 00:00:16.0145406 Calling 'NuGetClient'::'InstallPackage'. VERBOSE: InstallPackage' - name='Get-WindowsAutoPilotInfo', version='3.5',destination='C:\Users\admin\AppData\Local\Temp\711970404' VERBOSE: DownloadPackage' - name='Get-WindowsAutoPilotInfo', version='3.5',destination='C:\Users\admin\AppData\Local\Temp\711970404\Get-WindowsAutoPilotInfo\Get-WindowsAutoPilotInfo.nupkg', uri='https://www.powershellgallery.com/api/v2/items/psscript/' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/items/psscript/package/Get-WindowsAutoPilotInfo/3.5'. WARNING: Could not get response from query 'https://www.powershellgallery.com/api/v2/items/psscript/package/Get-WindowsAutoPilotInfo/3.5'. VERBOSE: Downloading package 'Get-WindowsAutoPilotInfo' failed, please make sure 'https://www.powershellgallery.com/api/v2/items/psscript/package/Get-WindowsAutoPilotInfo/3.5' is accessable. WARNING: MSG:SourceLocationNotValid «https://www.powershellgallery.com/api/v2/items/psscript/» PackageManagement\Install-Package : Package 'Get-WindowsAutoPilotInfo' failed to install. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:3538 char:21

Get-WindowsAutopilotInfo.ps1 : The term 'Get-WindowsAutopilotInfo.ps1' 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 line:11 char:1

Get-Content : Cannot find path 'C:\8519-4320-3746-5887-8608-0805-37-AutopilotHWID.csv' because it does not exist. At line:15 char:12

Cannot index into a null array. At line:17 char:1

Cannot index into a null array. At line:18 char:1

PS C:\Windows\system32>

jnsan413 commented 3 years ago

never mind I figured it out. Please see below

PS C:\Windows\system32> Get-PSRepository $PSVersionTable gmo PowerShellGet PackageManagement -ListAvailable Invoke-WebRequest 'https://www.powershellgallery.com/api/v2/'

Name InstallationPolicy SourceLocation


PSGallery Untrusted https://www.powershellgallery.com/api/v2

Key : PSVersion Value : 5.1.19041.610 Name : PSVersion

Key : PSEdition Value : Desktop Name : PSEdition

Key : PSCompatibleVersions Value : {1.0, 2.0, 3.0, 4.0...} Name : PSCompatibleVersions

Key : BuildVersion Value : 10.0.19041.610 Name : BuildVersion

Key : CLRVersion Value : 4.0.30319.42000 Name : CLRVersion

Key : WSManStackVersion Value : 3.0 Name : WSManStackVersion

Key : PSRemotingProtocolVersion Value : 2.3 Name : PSRemotingProtocolVersion

Key : SerializationVersion Value : 1.1.0.1 Name : SerializationVersion

Name : PowerShellGet Path : C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1 Description : PowerShell module with commands for discovering, installing, updating and publishing the PowerShell artifacts like Modules, DSC Resources, Role Capabilities and Scripts. Guid : 1d73a601-4a6c-43c5-ba3f-619b18bbb404 Version : 1.0.0.1 ModuleBase : C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1 ModuleType : Script PrivateData : {PSData, SupportedPowerShellGetFormatVersions, PackageManagementProviders} AccessMode : ReadWrite ExportedAliases : {[fimo, fimo], [inmo, inmo], [pumo, pumo], [upmo, upmo]} ExportedCmdlets : {} ExportedFunctions : {[Find-Command, Find-Command], [Find-DscResource, Find-DscResource], [Find-Module, Find-Module], [Find-RoleCapability, Find-RoleCapability]...} ExportedVariables : {} NestedModules : {}

PackageManagement : The term 'PackageManagement' 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 line:4 char:1

Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. At line:5 char:1

PS C:\Windows\system32>

811msa commented 1 year ago

PS C:\Windows\system32> Get-PSRepository $PSVersionTable gmo PowerShellGet PackageManagement -ListAvailable Invoke-WebRequest 'https://www.powershellgallery.com/api/v2

Hi Jane, I have this issue on a device, could you please let me know how did you got this sorted?

arntf commented 3 months ago

I have the same issue now

PS C:\WINDOWS\system32> Name InstallationPolicy SourceLocation Name : The term 'Name' 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 line:1 char:1