Invoke-Logoff
Invoke-Logoff Logoff a target User By Michael J. Thomas 04/24/2024 I decided to pull one of my older scripts off the back burner and share it with the world. This script has been handy for me with persistent account lockouts. The user has their password changed but has logged into multiple machines and the older password is locking the machine out. This script allows you to just target that computer and user and log them out. <# .Synopsis Logoff User off a Remote Computer. .DESCRIPTION Invoke-Logoff v1.0 Used to Logoff a User from a Remote Computer. This also tests if a computer is online and if WinRM is enabled. Created by Michael J. Thomas 9/11/2018. Updated 12/27/2018 .EXAMPLE Invoke-Logoff -ComputerName "computer01" -UserName "user01" #> Function Invoke-Logoff { [cmdletbinding()] param ( [String]$ComputerName, [String]$UserName #[Parameter(Mandatory = $true)] ) Function Get-QUser { [cmdletbind