not working ..
echo '-------------------------';
echo "[+] INFO: Atempting to fetch domain details for c:\Users* "
echo '-------------------------';
(Get-ChildItem -Path "C:\Users*").name |ForEach-Object {
Start-Process -FilePath "net" -ArgumentList " user $_ /domain " -NoNewWindow -Wait -RedirectStandardOutput "$Env:temp\users.txt"
Get-Content -Path "$Env:temp\users.txt" | Select-String -Pattern "Full Name|Comment" -CaseSensitive
}
not working ..
echo '-------------------------';
echo "[+] INFO: Atempting to fetch domain details for c:\Users* "
echo '-------------------------';
(Get-ChildItem -Path "C:\Users*").name |ForEach-Object {
Start-Process -FilePath "net" -ArgumentList " user $_ /domain " -NoNewWindow -Wait -RedirectStandardOutput "$Env:temp\users.txt"
Get-Content -Path "$Env:temp\users.txt" | Select-String -Pattern "Full Name|Comment" -CaseSensitive
}