Sign in
android
/
platform
/
external
/
pytorch
/
d1afb7d43d5f4e958aed0e3fc9b956d9529c3d93
/
.
/
.github
/
scripts
/
kill_active_ssh_sessions.ps1
blob: 09cc63e94bc1f86df303460055094678f0945e73 [
file
] [
log
] [
blame
]
function
Get
-
SSH
-
Sessions
{
Get
-
Process
sshd
-
IncludeUserName
|
Where
-
Object
UserName
-
notLike
"*SYSTEM*"
|
Select
-
Object
Id
}
$runningSessions
=
Get
-
SSH
-
Sessions
foreach
(
$session
in
$runningSessions
)
{
Stop
-
Process
-
id $session
.
Id
}