Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Tobias Nilsson
Jan 23, 2012
  5422
(2 votes)

Problems installing EPiServer Commerce

Are you having troubles installing Commerce? 

Are you receiving this error message:

System.Management.Automation.PSInvalidOperationException: The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and only from that same thread. Validate that the cmdlet makes these calls correctly, or please contact Microsoft Support Services.

Unfortunately the installation should copy the log files to the application root, but it doesn't seems to do that. To see the actual error and not just a generic Powershell error, we need to modify the installation script a bit (find this in the Commerce installation directory).

First comment out the line that deletes the temp folder:

# DeleteFolder $unzipTempFolder

Then remove the signature at the bottom of the file as it's invalid now and then save the file.

# SIG # Begin signature block
# MIIVNwYJKoZIhvcNAQcCoIIVKDCCFSQCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
..... lots of text....
# ISmDxA7ThKuIxlg=
# SIG # End signature block

As the file is no longer signed, we can't run it before we have made some PowerShell policy adjustments. The default policy is to not allow unsigned scripts to run. So we must change it

PS C:\Users\tobias> Set-ExecutionPolicy 'unrestricted'

Now run EPiServer deployment center and run the Commerce installation and after it have failed you should have a new catalog in your c: drive. In that folder you should find a log folder which contains the installation logs (installer logs). There you will find what the error really was.

Hope this helps with your Commerce install issues!

Jan 23, 2012

Comments

André Hedberg
André Hedberg Apr 24, 2012 05:32 PM

Thank you!

Although, I needed to run Set-ExecutionPolicy -scope CurrentUser -executionPolicy Unrestricted in order for it to work.

May 11, 2012 03:33 PM

Yes, forgot about that part. Thank you!

matt@vividgroup.com.au
matt@vividgroup.com.au Jun 28, 2012 06:20 AM

Hello!

Newbie here and having the installer issue detailed above. Looking for some help on how to get access to the installer scripts as mentioned in the first post:

First comment out the line that deletes the temp folder:

# DeleteFolder $unzipTempFolder

Nikolay Moskalev
Nikolay Moskalev Aug 20, 2012 03:36 PM

Thank you, Toni and André Hedberg

Nov 7, 2012 01:19 PM

Smoking Joe:

I had mine in Program Files (x86)\EPiServer\CMS\[Version]\Install\Modules\Commerce\

Martin Ernbo
Martin Ernbo Mar 6, 2013 02:25 PM

I had the exact same error. It was caused by the site using a vpp-folder stored on a network location. The Commerce installation fails because of this.

The solution i simple - just temporarily make a copy of the vpp to a folder on the local machine, change path to the vpp in config and re-run the installation of commerce. When the installation has completed change the configuration of the site back to the origial location.

K Khan
K Khan Sep 20, 2013 04:36 PM

It solved the issues for us, Many thanks

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog