Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell: search for a string in command output

$
0
0

Hello,

I am trying to search for a string in an output command.
In Exchange, I am finding if I find a username in a result of Get-MailBoxPermission.

This is the command I run (but not work)
Powershell
Get-MailboxPermission-IdentityuserA@mycompany.com|Select-String-Pattern"userB"
This command does not return me an error, but I know that I should find the string userB, because it is mentionned in the result list as DominName\userB.

I am sure it is possible, and that I am not using the correct command.
Can someone help me on this?


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>