Guest User

Untitled

a guest
Jan 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. (Get-LocalUser).Name | Out-File C:localusers.txt
  2.  
  3. ForEach ($User in Get-Content C:localusers.txt)
  4. {
  5. If ($User -match "administrator" -or "kahuna")
  6. {
  7. Write-Host True
  8. }
  9. Else
  10. {
  11. Write-Host False
  12. }
  13. }
  14.  
  15. If ($User -match "administrator" -or $User -match "kahuna")
  16.  
  17. If (($User -match "administrator") -or ($User -match "kahuna"))
  18.  
  19. If (($true) -or ($false))
Add Comment
Please, Sign In to add comment