LaZy IT
Wednesday, February 8, 2023
PowerShell: Script to logoff all sessions on a Windows computer
This
PowerShell
script allows you to force logoff
all
user sessions on a
Windows
computer:
quser | Select-Object -Skip 1 | ForEach-Object {
$id = ($_ -split '+')[-5]
logoff $id
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment