<# FPS:Containers:Services:SC-Shortcuts:ACTIVE
#>
if (!(Push-NeededFor Shortcuts)) {
# Remove a prior patch if it already exists
Remove-Item -Path Function:\Shortcuts
} else {
# Only load the help line if a prior release is not
present, otherwise just keep whats
there - dependent
# on the release type. All CIs have the same shortcuts,
just Core releases have the options in the help line.
if ($global:pro_CI.Type -eq "Core") {
$genShortcuts = @($genShortcuts
(ConvertTo-DotFill $global:SCDotLen 'Shortcuts')+"[Switches(o): -connect -keepass
-wordpress -actions -gen] Lists all shortcuts.
Default=General (-gen)"
)
} else {
$genShortcuts = @($Shortcuts
(ConvertTo-DotFill $global:SCDotLen 'Shortcuts')+"[Switches: na ] Lists all
general and deprecated shortcuts"
)
}
}
function Shortcuts {
<#
.DESCRIPTION
Module: Services
Shortcut: SC-Shortcuts.ps1
Has Dependencies: No
This CmdLet displays the most
recent help line for all the Shortcuts loaded. Switches are
available for Connect, KeePass, WordPress, and Servicenow centric software. Deprecated shortcuts
are also displayed at the end of the listing.
Shortcuts are loaded via Pro-Config and should not be
reloaded during a Powershell session
.EXAMPLE
shortcuts
.CC
[2024.11.07 JD] Updates made to the shortcuts for ConvertTo-DotFill use
[2024.09.24 JD] Original code release
.NOTES
A functionality that is deprecated is likely to be
removed in the future hence it is not advisable to use it.
Depreciated functionalities are usually replaced or
updated in newer patches.
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$false)] [switch]$connect,
[Parameter(Mandatory=$false)] [switch]$keepass,
[Parameter(Mandatory=$false)] [switch]$actions
)
if ($global:pro_CI.Type -eq "Core") {
if ($PSBoundParameters.ContainsKey('connect')) {
Write-Host " "
Write-Host "FPS Connect Shortcuts"
Write-Host "NOTE: Focus is recommended for the server where the
alias will run"
Write-Host " "
if($ConnShortcuts) { $ConnShortcuts } else { Write-Host "No FPS Connect shortcuts have been
defined" }
Write-Host " "
Write-Host "Deprecated FPS Connect Shortcuts"
Write-Host " "
if($deprecatedConnShortcuts) { $deprecatedConnShortcuts } else { Write-Host "No Deprecated FPS Connect shortcuts
have been defined" }
} elseif ($PSBoundParameters.ContainsKey('keepass')) {
Write-Host " "
Write-Host "KeePass Shortcuts"
Write-Host "NOTE: Focus is NOT recommended for the server(s)
where the alias will run"
Write-Host " "
if($kpShortcuts) { $kpShortcuts } else { Write-Host "No KeePass Management shortcuts have
been defined" }
Write-Host " "
Write-Host "Deprecated KeePass Shortcuts"
Write-Host " "
if($deprecatedKPShortcuts) { $deprecatedKPShortcuts } else { Write-Host "No Deprecated KeePass shortcuts have
been defined" }
} elseif ($PSBoundParameters.ContainsKey('wordpress')) {
Write-Host " "
Write-Host "WordPress Shortcuts"
Write-Host "NOTE: Focus is NOT recommended for the server(s)
where the alias will run"
Write-Host " "
if($wpShortcuts) { $wpShortcuts } else { Write-Host "No WordPress Management shortcuts
have been defined" }
Write-Host " "
Write-Host "Deprecated WordPress Shortcuts"
Write-Host " "
if($deprecatedWPShortcuts) { $deprecatedWPShortcuts } else { Write-Host "No Deprecated WordPress shortcuts
have been defined" }
} elseif ($PSBoundParameters.ContainsKey('actions')) {
Write-Host " "
Write-Host "Servicenow Action
Shortcuts"
Write-Host "NOTE: Focus is NOT recommended for the server(s)
where the alias will run"
Write-Host " "
if($snShortcuts) { $snShortcuts } else { Write-Host "No Servicenow
Action shortcuts have been defined" }
Write-Host " "
Write-Host "Servicenow Action
Deprecated Shortcuts"
Write-Host " "
if($deprecatedSNShortcuts) { $deprecatedSNShortcuts } else { Write-Host "No Deprecated Servicenow
Action shortcuts have been defined" }
} else {
Write-Host "General Shortcuts"
Write-Host " "
if($genShortcuts) { $genShortcuts } else { Write-Host "No General shortcuts have been
defined" }
Write-Host " "
Write-Host "Deprecated Shortcuts"
Write-Host " "
if($deprecatedShortcuts) { $deprecatedShortcuts } else { Write-Host "No Deprecated shortcuts have been
defined" }
}
} else {
Write-Host "General Shortcuts"
Write-Host " "
if($genShortcuts) { $genShortcuts } else { Write-Host "No General shortcuts have been
defined" }
Write-Host " "
Write-Host "Deprecated Shortcuts"
Write-Host " "
if($deprecatedShortcuts) { $deprecatedShortcuts } else { Write-Host "No Deprecated shortcuts have been
defined" }
}
Write-Host ''
if ($global:pro_CI.Type -eq "Core") {
Write-Host "[Switches(o): -connect -keepass
-wordpress -actions -gen] Lists all shortcuts.
Default=General (-gen)"
} else {
Write-Host "[Switches: na ] Lists all general and deprecated shortcuts"
}
Write-Host ''
}