- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: PowershellScript Error : Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
PowershellScript Error : Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
Hi,
The following powershell script works fine from a console. But failing when invoked as a deferred custom action from InstallShield.
Import-Module WebAdministration
$thumb = Get-ChildItem -Path iis:\sslbindings | ? {$_.Port -eq 443} | Select -expand Thumbprint
$cert = get-item cert:\LocalMachine\my\$thumb
Export-Certificate -Type CERT -Cert $cert -FilePath "c:\temp\Cert-DER.cer"
Tried with setting IS_PS_EXECUTIONPOLICY as RemoteSigned/ByPass but always getting the following error.
MSI (s) (68:58) [01:29:37:331]: Executing op: CustomActionSchedule(Action=GenerateBase64Cert,ActionType=1025,Source=BinaryData,Target=m2,)
MSI (s) (68:5C) [01:29:37:331]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIB74A.tmp, Entrypoint: m2
InstallShield: Attempting to load through CLR 4 APIs...
InstallShield: Getting meta host...
InstallShield: Enumerating available runtimes...
InstallShield: Highest available runtime: v4.0.30319
InstallShield: Trying to use highest runtime...
InstallShield: Using highest version runtime...
InstallShield: Deferred action requested property MsiHiddenProperties not provided by CustomActionData
InstallShield: Loading assembly ClrPsHelper from resource 4097
InstallShield: Calling method with parameters [(System.UInt32)1944, (System.String)C:\Users\Administrator\AppData\Local\Temp\473bac47-bbae-4365-a6bc-321579f5c4a4\GenerateBase64Cert.ps1]
PowerShell wrapper: Deferred action requested property MsiHiddenProperties not provided by CustomActionData
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
......
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.Powershell.Provider.resources, Version=10.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
InstallShield: Loading Assembly Microsoft.IIS.Powershell.Provider.resources
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.Powershell.Provider.resources, Version=10.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
InstallShield: Loading Assembly Microsoft.CertificateServices.PKIClient.Cmdlets
InstallShield: Couldn't resolve assembly by name Microsoft.CertificateServices.PKIClient.Cmdlets
InstallShield: Loading Assembly Microsoft.CertificateServices.PKIClient.Cmdlets
Any help on this will be appreciated.
Thanks
Unnikrishnan
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Add-Type -assembly "Microsoft.IIS.PowerShell.Framework"
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Add-Type -assembly "Microsoft.IIS.PowerShell.Framework"
But, Still getting the same error like this:
MSI (s) (94:C8) [23:32:32:886]: Executing op: CustomActionSchedule(Action=GenerateBase64Cert,ActionType=1025,Source=BinaryData,Target=m2,)
MSI (s) (94:B8) [23:32:32:886]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI41EE.tmp, Entrypoint: m2
InstallShield: Attempting to load through CLR 4 APIs...
InstallShield: Getting meta host...
InstallShield: Enumerating available runtimes...
InstallShield: Highest available runtime: v4.0.30319
InstallShield: Trying to use highest runtime...
InstallShield: Using highest version runtime...
InstallShield: Deferred action requested property MsiHiddenProperties not provided by CustomActionData
InstallShield: Loading assembly ClrPsHelper from resource 4097
InstallShield: Calling method with parameters [(System.UInt32)1840, (System.String)C:\Users\Administrator\AppData\Local\Temp\0fe4d61e-028e-4d26-a843-2ac2e753245d\GenerateBase64Cert.ps1]
PowerShell wrapper: Deferred action requested property MsiHiddenProperties not provided by CustomActionData
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Provider
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Provider
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Provider
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Provider
InstallShield: Loading Assembly Microsoft.IIS.Powershell.Provider.resources
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.Powershell.Provider.resources, Version=8.5.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
InstallShield: Loading Assembly Microsoft.IIS.Powershell.Provider.resources
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.Powershell.Provider.resources, Version=8.5.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
InstallShield: Loading Assembly Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Loading Assembly Microsoft.CertificateServices.PKIClient.Cmdlets
InstallShield: Couldn't resolve assembly by name Microsoft.CertificateServices.PKIClient.Cmdlets
InstallShield: Loading Assembly Microsoft.CertificateServices.PKIClient.Cmdlets
MSI (s) (94:C8) [23:32:44:839]: Executing op: ActionStart(Name=ISSQLServerWriteLoginInfo,,)
InstallShield: Couldn't resolve assembly by name Microsoft.CertificateServices.PKIClient.Cmdlets
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
While InstallShield deferred custom action the throws this error(in the previous post) in the installation log, the same power-shell script works fine from a power-shell console.
When the same power-shell script is executed using LaunchAppAndWait(), I got a different error in the console. Please have a look at the attached document.
Looks like the InstallSHield's Powershell console is having different behavior.
Thanks
Unnikrishnan