ps/Modules/Alkami.PowerShell.IIS/Public/Stop-IISOnly.ps1
2023-05-30 22:51:22 -07:00

18 lines
319 B
PowerShell

function Stop-IISOnly {
<#
.SYNOPSIS
Stops IIS by running iisreset /stop
#>
[CmdletBinding()]
param(
)
$logLead = (Get-LogLeadName);
Write-Output "$logLead : Stopping IIS...";
Invoke-Command { C:\Windows\System32\iisreset.exe /stop } | Out-Null;
Write-Output "$logLead : Done";
}