Hi,
I'm trying to use the New-InboxRule to make emails that contain a specific word in the subject get moved to the users Junk E-mail folder. While I want a script to apply this to all users, I'd like to make it work for just one first.
I though the command to use would be one of these, but either one does not run and puts me at a >> prompt.
New-InboxRule -name "SPAM" -Mailbox "John Doe" -MoveToFolder"John Doe\Junk E-Mail" -SubjectContainsWords "***SPAM***"
New-InboxRule -name "SPAM" -Mailbox me@contoso.com -MoveToFolder"me@contoso.com\Junk E-Mail" -SubjectContainsWords "***SPAM***"
Please help me to stop punding my head on the desk :)