ps/Modules/Alkami.PowerShell.SDK/Public/Stop-SDKServices.ps1

23 lines
569 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
Function Stop-SDKServices {
<#
.SYNOPSIS
Stop all the running Alkami SDK services.
.DESCRIPTION
Stop all Alkami Windows services associated with the SDK, including any hung processes.
.EXAMPLE
Stop-SDKServices
.NOTES
General notes
#>
[CmdletBinding()]
param(
)
$serviceNames = (Get-ServiceInfoByCIMFragment C:\programdata\chocolatey\lib\).Where({$_.Name -match 'Alkami' -and $_.Name -ne "Alkami.Sidekick.Client" -and $_.ProcessId -gt 0}).Name
foreach ($serviceName in $serviceNames) {
Stop-AlkamiService -ServiceName $serviceName
}
}