$num=(iex "query user").Count-1 $time=(Get-Date).ToString('yyyy-MM-dd HH:mm:ss') ($time+","+$num)|Out-File -Append "GetUsers.txt"