I was trying to install
Sitecore PowerShell on my Sitecore 8.2 instance by downloading “Full
4.6 release for Sitecore 8”. After successful installation, when
I started PowerShell console, I hit with error
"Could not load file or assembly 'System.Management.Automation,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of
its dependencies. The system cannot find the file specified."
As my laptop running on
Windows 7 (Yes, it’s still on WIN 7) on 64-bit processor, so I fixed this by
downloading and installing "Windows Management Framework 4.0"
having setup file name "Windows6.1-KB2819745-x64-MultiPkg.msu"
from https://www.microsoft.com/en-us/download/details.aspx?id=40855
Note - You must need
to restart your machine after this setup.
After restarting machine, login
to Sitecore instance and open PowerShell Console. It was started but received pop
up note that "Elevated session state is required to run the script." and
Sitecore asking for current Sitecore logged-in user password. This pop up will raise
when you open any PowerShell window with every Sitecore login time.
To fix this
Open "include\Cognifide.PowerShell.config"
file and make entry as "allow" in below keys
<token name="Default" expiration="00:00:00" elevationAction="Allow"/>
<token name="Console" expiration="00:05:00" elevationAction="Allow"/>
<token name="ISE" expiration="00:05:00" elevationAction="Allow"/>
<token name="ItemSave" expiration="00:05:00" elevationAction="Allow"/>
Please note, this
configuration changes are only for local development environment. Don’t make it
on Production environment.
After this my PowerShell started
working fine on my new Sitecore 8.2 instance.
Please leave your comments or share this trick if it’s
useful for you.
References
No comments:
Post a Comment