Hopefully someone could help me with a scripts I trying to get working.
I need to setup a Transport rule for our students to pick up on any key or bad words and send them for moderation to a member of staff.
The rule is setup and works perfectly the issue is now getting my 500+ list of words into the rules without dieing of boredom doing it manually!
I found a TechNet guide which looked ideal to start from however I'm having issues even running these commands exactly as documented here. I receive the following error about Cannot convert value to type.
$keywords=import-csv C:\words.csv -header Keywords New-TransportRule "Block messages with unacceptable words" -SubjectOrBodyContainsWords $keyword s -SentToScope "NotInOrganization" -RejectReason "Do not use internal acronyms, product names, or misspellings in extern al communications."Cannot process argument transformation on parameter 'SubjectOrBodyContainsWords'. Cannot convert value "System.Collecti ons.ArrayList" to type "Microsoft.Exchange.Data.Word[]". Error: "Cannot convert the "@{Keywords=Word1}" value of type " Deserialized.System.Management.Automation.PSCustomObject" to type "Microsoft.Exchange.Data.Word"."+ CategoryInfo : InvalidData: (:) [New-TransportRule], ParameterBindin...mationException+ FullyQualifiedErrorId : ParameterArgumentTransformationError,New-TransportRule
Does anyone have any advice what could be causing this issue, could it be my csv file perhaps I'm not sure.
Much appreciated,
Rob