0

I'm trying update IISAdministrator in windows nano server with remote powershell

Current Version '1.0.0.0, update to version '1.1.0.0'

Install-Module -Name IISAdministration -verbose -force

Then result below

VERBOSE: Using the provider 'PowerShellGet' for searching packages.
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' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='IISAdministration'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'IISAdministration'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'C:\tmp' and PackageManagementProvider is 'NuGet'.
VERBOSE: Total package yield:'0' for the specified package 'IISAdministration'.
VERBOSE: Performing the operation "Install-Module" on target "Version '1.1.0.0' of module 'IISAdministration'".
VERBOSE: The installation scope is specified to be 'AllUsers'.
VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modules'.
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'IISAdministration' with version '1.1.0.0' from the repository 'https://www.powershellgallery.com/api/v2'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='IISAdministration'' for ''.
VERBOSE: InstallPackage' - name='IISAdministration', version='1.1.0.0',destination='C:\Users\Administrator\AppData\Local\Temp\1137679534'
VERBOSE: DownloadPackage' - name='IISAdministration', version='1.1.0.0',destination='C:\Users\Administrator\AppData\Local\Temp\1137679534\IISAdministration\IISAd
ministration.nupkg', uri='https://www.powershellgallery.com/api/v2/package/IISAdministration/1.1.0'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/IISAdministration/1.1.0'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/IISAdministration/1.1.0'.
VERBOSE: Completed downloading 'IISAdministration'.
VERBOSE: InstallPackageLocal' - name='IISAdministration', version='1.1.0.0',destination='C:\Users\Administrator\AppData\Local\Temp\1137679534'
VERBOSE: Found the catalog file 'IISAdministration.cat' in the module 'IISAdministration' contents.
VERBOSE: Valid authenticode signature found in the catalog file 'IISAdministration.cat' for the module 'IISAdministration'.
VERBOSE: Validating the 'IISAdministration' module files for catalog signing using the catalog file 'IISAdministration.cat'.
PackageManagement\Install-Package : The module 'IISAdministration' cannot be installed because the catalog signature in 'IISAdministration.cat' does not match 
the hash generated from the module.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1661 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : InvalidCatalogSignature,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

I'm tried add parameter SkipPublisherCheck it's successfully, but

Import-Module IISAdministration

I'm take error below

Could not load file or assembly 'Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 
The system cannot find the file specified.
    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand

I'm tried install package local

Install-Package C:\Package\iisadministration.1.1.0.nupkg

but install failed

Install-Package : Package 'IISAdministration' failed to install.
    + CategoryInfo          : InvalidResult: (IISAdministration:String) [Install-Package], Exception
    + FullyQualifiedErrorId : PackageFailedInstallOrDownload,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Any solutions, help me.

  • There are similar question here you can use as a reference: [https://www.javydekoning.com/fixing-signature-nanoserverpackage-cat-not-match-hash](https://www.javydekoning.com/fixing-signature-nanoserverpackage-cat-not-match-hash). – samwu Dec 01 '21 at 06:44
  • @samwu Hello, I'm tried, but when using Find-NanoServerPackage, I'm got error WARNING: Cannot find path 'C:\Users\Administrator\AppData\Local\NanoServerPackageProvider\searchNanoPackageIndex.txt' because it does not exist. WARNING: Save-HTTPItem: Bits Transfer failed. Job State: BG_JOB_STATE_ERROR ExitCode = 0 – Nguyen Nguyen Dec 01 '21 at 09:01
  • It is difficult to reproduce your problem, I suggest you open a case via: https://support.microsoft.com. – samwu Dec 03 '21 at 09:35

0 Answers0