3

I am trying to migrate a Sitecore 9.0.2 to 9.1.1. Following the upgrade guide https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/91/Sitecore_Experience_Platform_91_Update1.aspx, I have to create an Identity Server.

So, I have created a new Web App on my Azure ressource group which already contains the current Wep App with Sitecore 9.0.2.

Then, I have run the installation script (page 10)

$prefix="sc"
$CMurl="https://$prefix"
$IdentityServer="$prefix-IdentityServer"
$ClientSecret="Random_STRING"
$SqlServer = ".\SQLEXPRESS"
$SqlAdminUser = "User"
$SqlAdminPassword="Password"
$PSScriptRoot = "c:\resourcefiles"
#install client certificate for IdentityServer
$certParamsForIdentityServer = @{
Path = "$PSScriptRoot\createcert.json"
CertificateName = $IdentityServer
}
Install-SitecoreConfiguration @certParamsForIdentityServer -Verbose
#install Sitecore Identity Server
 $identityParams =
 @{
 Path = "$PSScriptRoot\IdentityServer.json"
 Package = "$PSScriptRoot\Sitecore.IdentityServer.2.0.1 rev. 00166.scwdp.zip"
 SqlDbPrefix = $prefix
 SqlServer = $SqlServer
 SqlCoreUser = $SqlAdminUser
 SqlCorePassword = $SqlAdminPassword
 SitecoreIdentityCert = $certParamsForIdentityServer.CertificateName
 Sitename = $IdentityServer
 PasswordRecoveryUrl = $CMurl
 AllowedCorsOrigins = $CMurl
 ClientSecret = $ClientSecret
 LicenseFile = "$PSScriptRoot\license.xml"
 }
Install-SitecoreConfiguration @identityParams -Verbose

on a Kudu interface and I have the following error :

Install-SitecoreConfiguration : The 'Install-SitecoreConfiguration' command 
was found in the module 'SitecoreInstallFramework', but the module could not 
be loaded. For more information, run 'Import-Module SitecoreInstallFramework'.
At D:\home\resourcefiles\install.ps1:16 char:1
+ Install-SitecoreConfiguration @certParamsForIdentityServer -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-SitecoreConfiguration:S 
   tring) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Install-SitecoreConfiguration : The 'Install-SitecoreConfiguration' command 
was found in the module 'SitecoreInstallFramework', but the module could not 
be loaded. For more information, run 'Import-Module SitecoreInstallFramework'.
At D:\home\resourcefiles\install.ps1:34 char:1
+ Install-SitecoreConfiguration @identityParams -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-SitecoreConfiguration:S 
   tring) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

As explain on the error, I have executed the command "Import-Module SitecoreInstallFramework", and now I have the following error :

Import-Module : The script 'SitecoreInstallFramework.psm1' cannot be run 
because it contains a "#requires" statement for running as Administrator. The 
current Windows PowerShell session is not running as Administrator. Start 
Windows PowerShell by  using the Run as Administrator option, and then try 
running the script again.
At line:1 char:1
+ Import-Module SitecoreInstallFramework
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (SitecoreInstallFramework.psm1 
   :String) [Import-Module], ScriptRequiresException
    + FullyQualifiedErrorId : ScriptRequiresElevation,Microsoft.PowerShell.Com 
   mands.ImportModuleCommand

Ok, I don't have administrator access to execute some command. But I am on an Azure Web App, and I could not change my permission to administrator.

Does my approach is correct to create an Identity Server ?

  • 1
    As the script says, you need to be in an elevated PowerShell session. – Mark Cassidy Apr 29 at 13:02
  • How can I have an elevated PowerShell session on an Azure Web App ? – Arnaud BLAVOINE Apr 29 at 13:05
  • Your approach will not work, the documentation is for On-Prem, not Azure PaaS. You can either create a custom ARM template to deploy SI, (you can use this as a reference) – Mark Gibbons May 4 at 8:26
  • Or you can use MSDeploy from your local machine - you can use this as an example, however you will need to pass in all the additional params to MSDeploy (which you had in the original PS script). – Mark Gibbons May 4 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.