Saturday, March 5, 2016

Powershell Find user is logged in where

clear
$ErrorActionPreference = "SilentlyContinue"
$net=2
while($net -le 3)
{
$i=2
while($i -le 254)
{
$ipp=$i.ToString()
$ntt=$net.ToString()
$pre="192.168."+$ntt+"." + $ipp
$mn=[Net.IPAddress]::Parse($pre)
write-host $mn
query session /server:$mn
echo "================"
$i=$i+1
}
$net=$net+1
}

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...