Apr 15 2020 08:18 PM
Hello, my goal (simplified) is to find phone-numbers from a remote user.
I can successfully find matching strings on local machines with the second command, but it does not work when running remotely:
icm -cn <ip-addr> -cr <username> {
gci -path C:\Users\IEUser\Downloads | select-string -Pattern "\d{3}-\d{4}" -AllMatches}
I have no error returned, just blank space.
I have successfully ran other remote (icm) commands.
Please let me know if there is a fix to this.
- Justin
Apr 15 2020 09:22 PM
SolutionSOLVED --
just needed " | fc " before the end of the script-block. better write-up is on stack-overflow.
icm -cn <ip-addr> -cr <username> {
gci -path C:\Users\IEUser\Downloads | select-string -Pattern "\d{3}-\d{2}-\d{4}" -AllMatches | fc}
Apr 15 2020 09:22 PM
SolutionSOLVED --
just needed " | fc " before the end of the script-block. better write-up is on stack-overflow.
icm -cn <ip-addr> -cr <username> {
gci -path C:\Users\IEUser\Downloads | select-string -Pattern "\d{3}-\d{2}-\d{4}" -AllMatches | fc}