Get Site Title and write it to the Fusion Job Log

$web = Get-PnPWeb
Add-xJobLog -LogType "Information" -Message $web.Title
Add-xJobLog -LogType "Information" -Message "Take a break :-)"
Start-Sleep -Seconds 10
Add-xJobLog -LogType "Information" -Message "Sleeping..."
Start-Sleep -Seconds 10
Add-xJobLog -LogType "Information" -Message "OK .. move on.."

Get user input

$Text = Read-Host "Type something:"

Test if it is the first time the script runs in a Fusion Shared Session

if(Test-Path variable:FusionSession) # Check if the varible $FusionSession exists.
{
   $FusionSession = $FusionSession +1
   Write-Host "Session invoked count: $FusionSession" -ForegroundColor Cyan
   #
   # Your code that reuses the PowerShell session.
   #
}
else
{
   $FusionSession = 1 # Initialize the $FusionSession variable
   Write-Host "The First times this session was invoked!" -ForegroundColor Green
   #
   # Your initialization code here .. for example ConnectPnPOnline that only needs to run once.
   #
}

Need more help with this?
DON'T HESITATE TO CONTACT US HERE ..

Thanks for your feedback.