Home All Other Feature Requests and Ideas
We appreciate you taking the time to vote and add your suggestions to make our products awesome! Your request will be submitted to the community for review and inclusion into the backlog.

We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.

For more information around feature requests in the Cireson Community click here.

Offline licenses provided as CSV

Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
It would speed up our deployment of Cireson apps considerably if we were provided with a CSV of our licenses instead of saving a web page.

Current procedure:
  1. Get environment product key and transcribe environment hash for each offline environment
  2. Save each page as PDF
  3. Transfer to offline network
  4. Manually copy/paste license keys into the licensing app UI. At time of writing, I can only do one at a time because the app throws an error and will not save my licenses otherwise.
Ideal:
  1. Get environment product key and transcribe environment hash for each offline environment
  2. Transfer to offline network
  3. PowerShell script to read the CSV and update license keys
I already know how to update the app licenses via PowerShell, but not the portal licenses without updating the db table directly. Any tips here would be appreciated.


4 votes

Submitted · Last Updated

Comments

  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Can you share the PowerShell Script? Its so time consuming when your an air gaped environment. Thanks
  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    edited June 2017
    You can use PowerShell to write the license data to a json file on a machine connected to the Internet:
    # Define your product key, the environment hash key is used for portal products only<br>$ProductKey = ""<br><br>$Uri = "http://licensing.cireson.com/api/versionedlicenses/$($ProductKey)?environmentHashCode="<br>$Licenses = Invoke-RestMethod $Uri <br>$Licenses | ConvertTo-Json | Out-File "C:\data\licenses.json"

    Then copy the JSON file to the server and run this command to read the file contents into SCSM:

    $LicensedProducts =  @{"Asset Management Import" = "c4dcab1e-7fe3-5ccb-a1d3-f44486390a7f";<br>    "Asset Management" = "0a2c6612-368e-605c-6ba1-6d73b80dda86";<br>    "Affected User" = "4e2ef5f4-7f46-8796-1059-93a836016275";<br>    "My Active Work Items" = "83469f9a-b591-4819-8229-31a780460296";<br>    "Preview Forms" = "9368e098-0822-98f6-3377-41829c01c947";<br>    "Group Assign" = "0413ae4c-4f15-32e6-7d26-b0b5058e40be";<br>    "Risk Calculator" = "76459c98-9a70-23f1-1238-a09d0ba314cf";<br>    "Tier Watch" = "eb51d36c-f777-0f48-5f6a-36213f50b1ec";<br>    "Change Request Calendar" = "a0ad9c33-7ceb-3a43-2fe3-ee2f7c38388d";<br>    "Release Record Calendar" = "95db631f-0b8f-2337-a005-e57c3d83a0f2";<br>    "Notify Analyst" = "aa3f7f14-1b28-aa8b-b1ee-e39162eaa92a";<br>    "Outlook Console" = "39dd4bf4-4882-21a8-f22a-cefdf6eae95d";<br>    "View Builder" = "5a4b8d5e-ba8e-a63d-90aa-31e36dc86156";<br>    "SMA Connector" = "3c4b8679-ec30-8e5c-e197-897274a2df34";<br>    "Scheduled Calendar" = "0b0c72ea-8337-b896-d6e7-c4dc5a251a44";<br>    "Lync App" = "eb7b259c-f52b-07b9-fbe0-497520978588";<br>    "Sugar Connector" = "929d07b2-a770-b193-522f-6b82f9e35b58";<br>    "Project Connector" = "5a49b80c-4c34-d189-ca94-a591580f1995";<br>    "Survey App" = "b90ab153-ac71-c078-442a-34ed9a73af56";<br>    "Skype App" = "4fa43a27-ea3b-93c7-6654-e2d8403022d0";<br>    "Powershell Activity" = "81cfeb98-b4a6-87e6-639a-2a8d4797f881"}<br><br><br>$Licenses = Get-Content -Raw -Path C:\data\licenses.json | ConvertFrom-Json <br>foreach ($License in $Licenses)<br>{<br>    $ProductSetting = $LicensedProducts.$($License.ProductName)<br>    if ($ProductSetting)<br>    {<br>        try<br>        {<br>            $Setting = Get-SCSMSetting -Id $ProductSetting -ErrorAction Stop<br>            $Setting.Key = $License.Key<br>            Write-Host "Writing license key for" $License.ProductName<br>            Update-SCSMSetting -Setting $Setting<br><br>        }<br>        catch<br>        {<br>        }<br>    }<br>    <br>}<br><br>
     


  • Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
    Thanks @john_doyle! That will save me so much time!

    @Brian_Wiest, my script is practically identical to John's second script, except I was using my own manually-crafted source.
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Tested the script and my environment is locked down where Powerschell returned unsupported browser thru the proxy. So I will have to continue cut and pasting. 
  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    @Brian_Wiest
    Not sure I understand the issue. You should be able to run the first script on any machine connected to the internet. The script which runs on the server does not need access to the internet.

    If you cannot use PowerShell to invoke the URI, you could use something like the Advanced REST Client in Chrome. Paste in the URL:
    <span>http://licensing.cireson.com/api/versionedlicenses/<yourProductKey>?environmentHashCode=</span>
    and then Download the results to a file.
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Our Firewall blocks PowerShell from accessing external content to build the json file. Only agent string allowed thru is IE and Chrome. 
    Using the string successfully got the json file. Sweet. This will save me so time.
  • Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
    @john_doyle,
    Has the api changed at all? For a while now I've not been getting portal keys in my JSON file, however it works using the same environment hash manually.
  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Hi @Leigh_Kilday

    I just tested the server using this code and it returned my Portal licenses
    # Define your product key, the environment hash key is used for portal products only<br>$ProductKey = ""<br>$envHashKey = ""<br><br>$Uri = "http://licensing.cireson.com/api/versionedlicenses/$($ProductKey)?environmentHashCode=$($envHashKey)"<br>$EncodedUri = [System.Web.HttpUtility]::UrlEncode($Uri) <br><br>$Licenses = Invoke-RestMethod $Uri <br>$Licenses | ConvertTo-Json | Out-File "C:\data\licenses.json"



  • Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
    That seems to have done it. Thanks @john_doyle!
Sign In or Register to comment.