Public/Printing/Restart-PrintSpooler.ps1

<#
Copyright © 2024 Integris. For internal company use only. All rights reserved.
#>


FUNCTION Restart-PrintSpooler {
    <#
    .SYNOPSIS
    Restarts the Print Spooler service.
 
    .DESCRIPTION
    This function forcefully restarts the Print Spooler service and displays a confirmation message.
 
    .PARAMETER None
    This function does not take any parameters.
 
    .EXAMPLE
    Restart-PrintSpooler
    Restarts the Print Spooler service.
 
    .INPUTS
    None. This function does not accept any piped input.
 
    .OUTPUTS
    None. The function does not return any output.
 
    .NOTES
    Ensure you have the necessary permissions to restart services.
    #>


    Restart-Service -Name "Spooler" -Force
    Write-Host "Print Spooler service restarted."
    RETURN $null
}