Error when upgrading from CMS6 to CMS6 R2 on Windows 8

Erik Sylwan
Member since: 2009
 

I'm running Windows 8 on my devepment machine and am trying to upgrade a site from CMS6 to CMS6 R2

Deployment Center returns an error:

At C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Install\System Scripts\Install Site (SqlServer).ps1:211 char:32
+ echo "Assembly redirect for $file: 1.0.0.0-$fileVerssion"
+ ~~~~~~
System.Management.Automation.ParentContainsErrorRecordException: At C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Install\System Scripts\Install Site (SqlServer).ps1:211 char:32
+ echo "Assembly redirect for $file: 1.0.0.0-$fileVerssion"
+ ~~~~~~
Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to delimit the name.

 

Looking at the PowerShell Script at the indicated line it is obviour the {} is missing around the file variable, so I tried to correct it, but then, of course, I get the error that the file has been tampered with, so upgrade still doesn't work.

 

Is there an official updated version of the ps1-script, or do you have another workaround?

/E

 

#64566 Jan 02, 2013 15:04
  •  
    #64865 Edited, Jan 13, 2013 23:18
  •  

    Hi E,

    I haven't heard of any similar cases, so maybe there is a updated 6 R2 on World. Download it and install it over (uninstall) the old one.

    But you can also change the powershell script file if you want to. All you need to do it remove the digital signature at the bottom and allow powershell to run non signed scripts. Search how to set Execution policy to unrestricted,

    #64866 Jan 14, 2013 8:33
  • Andreas Ågren
    Member since: 2012
     

    I have the same issue on my dev machine, but can't reproduce on a virtual machine (both are running win7-64). The only relevant difference that I can see is that the virtual-win7 is running powershell 2, where as the dev-win7 is running powershell 3.

    I have tried both of your tips Toni. Installing the current version of EPiServer Framework from world doesn't change anything I'm afraid. I also tried changing the execution policy for powershell to "Unrestricted" with scope "LocalMachine" and removed the signature from "Install Site (SqlServer).ps1", but deployment center still fails with this error message:

    At C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Install\System Scripts\Install Site (No database).ps1:6 char:3
    + & $installScript -properties $properties -features @{CopyBinFiles=$true; CopyUIF ...
    + ~~~~~~~~~~~~~~
    System.Management.Automation.ParentContainsErrorRecordException: File C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Install\System Scripts\Install Site (SqlServer).ps1 cannot be loaded. The file C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Install\System Scripts\Install Site (SqlServer).ps1 is not digitally signed. The script will not execute on the system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170

     

    I also tried removing the signature from "Install Site (No database).ps1" since that script is actually calling "Install Site (SqlServer).ps1", but I still get this error.

     

    I have created a developer issue on this problem.

    #64868 Edited, Jan 14, 2013 10:21
  •  

    That error message indicates that the right Powershell Execution policy wasn't set. If you have multiple Powershells on your computer (for example Powershell 2 x86 and Powershell 2 x64) you need to set the policy on the powershell EPiServer is using. 

    This link might be of help as well:

    http://stackoverflow.com/questions/12060460/using-powershell-2-as-default-version-on-windows-8

     

    #64869 Jan 14, 2013 10:39
  • Andreas Ågren
    Member since: 2012
     

    Thanks Toni,

    I didn't know that there are different settings for powershell 32-bit and 64-bit. I had of course set execution policy for 64-bit, and deployment center is a 32-bit app.

    Even so, this is a work-around ;).

     

     

     

    #64871 Jan 14, 2013 11:29
  • Goran Solomonovic
    Member since: 2005
     

    What did you actually do to make it work Andreas?

    I've tried adding following to the end of EPiServerInstall.exe.config:

    <runtime>
         <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
           <dependentAssembly>
             <assemblyIdentity name="System.Management.Automation" publicKeyToken="31bf3856ad364e35" />
             <publisherPolicy apply="no" />
          </dependentAssembly>
         </assemblyBinding>
      </runtime>

    Resulting in a new error:

    The following error occurred while loading the extended type data file:
    Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2977) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
    Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2984) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
    Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2991) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
    Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2998) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
    Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3005) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.

    System.Management.Automation.ParentContainsErrorRecordException: The term 'out-default' 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.

     
    #65417 Jan 29, 2013 14:30
  • Goran Solomonovic
    Member since: 2005
     

    Found a workaround. :)

    Removed the line: echo "Assembly redirect for $file: 1.0.0.0-$fileVerssion"

    Removed signature at the bottom of the ps file

    Did a Set-ExecutionPolicy to 'Unrestricted' on PowerShell (X86)

     

    #65418 Jan 29, 2013 14:54