do
{
netsh wlan show hostednetwork | Out-File D:\test.txt -append
date | Out-File D:\test.txt -append
Start-Sleep -Seconds 15
}while(1)
while ($true) {
$output = netsh wlan show hostednetwork
[int]$count = ($output | sls 'Number of clients').ToString().split(':')[1]
if ($count -gt 0) {
date | Out-File D:\test.txt -append
}
Start-Sleep -Seconds 15
}