SitecorePowerShell / Console

Sitecore PowerShell Extensions
https://doc.sitecorepowershell.com/
Other
114 stars 70 forks source link

Powershell ISE is throwing LicenseFailureException on executing Razl Command #1290

Closed darvisunny closed 4 months ago

darvisunny commented 1 year ago

Expected Behavior

Powershell ISE should execute the command and return results.

Actual Behavior

We are getting an exception on executing a Razl command on Powershell ISE in Sitecore CMS. It says "An error occured when checking for a license @ 10/28/2022 6:48:31 PM. The error message is: The activation was rejected by the server..,HedgehogDevelopment.RazlClient.CmdLets.RemoveItem". We have a razl licence and we can able to perform all operation on the razl tool, but we want to run razl commands inside Sitecore's Powershell ISE.

Steps to Reproduce the Problem

  1. Login to Sitecore
  2. Open Powershell ISE
  3. Execute command
  4. `# Export script generated at 28 October 2022 20:09:46

Import Razl powershell commands. This may need to be updated if the script is moved to another computer.

import-module "C:\Program Files (x86)\Sitecore\Razl\HedgehogDevelopment.RazlClient.dll"

Create connections

$StageMaster = Get-RazlConnection -SitecoreWebUrl https://authoringstage.uchicago.edu/ -DatabaseName master -Name Stage.Master -AccessGuid "............" $LocalMaster = Get-RazlConnection -SitecoreWebUrl https://uchicagosc.dev.local/ -DatabaseName master -Name Local.Master -AccessGuid "..............................................."

DeleteItem Delete /sitecore/content/UChicago Tenant/Intranet/Home/RazlTest from Stage.Master

Remove-RazlItem -Connection $StageMaster -ItemId "fba3c553-218c-47a3-b500-af50230e7811"`

Please include the version number of SPE and Sitecore.

Sitecore 9.3

michaellwest commented 1 year ago

Where is the razl license located and how does razl find it?

darvisunny commented 1 year ago

Hi Michaell,

The Key is located in the environment variable, if I try to run the power shell command from windows power shell it is working fine but not with power shell ISE inside sitecore. Is this the correct way or do we need to keep the key inside any config of the application.

Thanks, Darvi Sunny

michaellwest commented 1 year ago

Keep in mind that Razl is a product built and maintained by Sitecore while SPE is an open source module maintained by the community. If your use-case is not working as desired it may require someone to experiment with it to see why it's not working. Sitecore support may be able to offer some guidance to you if you open a support ticket.

AdamNaj commented 4 months ago

Closing for the following reasons: