Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

How are other companies managing Nitro upgrades and communication

Just curious what might be some best practices for upgrading Nitro Studio...

  1. How do companies keep track of what sites are using it
  2. How do you inform current owners of new and possibly required upgrades?
  3. How can we find out what sites have potential security vulnerabilities (like script editor web part)

 

Thanks for any feedback.

Good timing! I am just working on how to figure out what version of NITRO is being used for each of our sites. The process is its early stages and is rough, but will be streamlined and optimized if I decide to use it regularly.

I start with a PowerShell script to get the link to each NITRO Studio Admin page, and just copy the output:

<#
5/31/23 ajm
PURPOSE: Generate shortcuts to all NITRO SC Admin pages
HISTORY:
TODO: Generate SC list dynamically | Send output to a file for Power Automate flow | Add script to Power Automate flow
#>

###############################################
# Set screen size to avoid line wrap
$buffer = $host.ui.RawUI.BufferSize;
$buffer.width = 3000;
$buffer.height = 3000;
$host.UI.RawUI.Set_BufferSize($buffer)
###############################################

$WebURL = "https://<tenant>.sharepoint.com"
$InFile = ".\Site_Collections_All.csv" # Contains a single column called [Site_Collection]

Import-Csv $InFile | ForEach-Object {
$Address = "$WebURL$($_.Site_Collection)"
Connect-PnPOnline -Url $Address -Interactive

$Web = Get-PnPWeb -Includes ID
$WebID = $Web.Id.ToString()

Write-Output "$Address/_layouts/15/appredirect.aspx?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&redirect_uri=https%3a%2f%2fnitrostudio.azurewebSites.net%2FPages%2FNitroApps.aspx%3F%7BStandardTokens%7D%26r_webId=$WebID"
}

I'm not an expert by any means, but I created a Desktop Power Automate flow that:
Opens a browser to the URL generated above
Action: Get details of element on web page (see https://learn.microsoft.com/en-us/power-automate/desktop-flows/automation-web#extract-data-from-webpages)
{If you use Edge with the Desktop Power Automate extension you can select the element by pointing to it with your mouse, it'll give you the references needed)
UI Element, Site Collection: a[Id="PlaceHolderUserInfo_ltSiteName"] (Anchor 'Site Collection Home')
UI Element, Installed version: div[Id="PlaceHolderMain_panelInstalledVersion"]
Action: Write text to a file, the 2 variables from the UI Elements
Close the browser

I've tested it with one NITRO Admin address--I just started this yesterday--and it worked as expected. Next I will process it for all addresses, either in parallel or in a loop. Hopefully this will give an automated way to check where and which version of NITRO is installed. If anyone else tries this or has a better way, please post here since most of us would probably benefit from it!

DavisA and mikez have reacted to this post.
DavisAmikez

Thanks @pf-amalin, I will pass this on to someone on our team who does more powershell and power automate.

 

@pf-amalin, does your powershell get a list of just the collections where it is installed?
Or every site colletion and then you have to go to each one to see if it has it installed?

Thanks

Mike

Right now I use a list of Site Collections that I feed the PowerShell script via the CSV file. To make it dynamic I'd probably loop through all sites and using some sort of test to see if NITRO Studio is installed. Something like this:
$TenantURL = "https://<tenant>-admin.sharepoint.com"
$OutFile = ".\Output\SiteCollections.csv"
######## Site collections ############################################ Get All Site collections
Connect-PnPOnline -Url $TenantURL -Interactive
Get-PnPTenantSite # Lists them all on screen
# Or export to csv excluding non-applicable templates
Get-PnPTenantSite | Where -Property Template -NotIn ("SRCHCEN#0", "REDIRECTSITE#0", "SPSMSITEHOST#0", "APPCATALOG#0", "POINTPUBLISHINGHUB#0", "EDISC#0", "STS#-1","TEAMCHANNEL#1")  | select url | Export-Csv -path $OutFile -NoTypeInformation
######## Test for NITRO installed #################
$SiteCollections = Get-PnPTenantSite | Where -Property Template -NotIn ("SRCHCEN#0", "REDIRECTSITE#0", "SPSMSITEHOST#0", "APPCATALOG#0", "POINTPUBLISHINGHUB#0", "EDISC#0", "STS#-1","TEAMCHANNEL#1")
ForEach($SC in $SiteCollections) # Loop through each site collection
{
If (# TEST FOR NITRO, maybe look for a NITRO list? #)
{
Write-host $SC.URL
}
}