Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I am trying to configure a custom disclaimer using powershell, i have managed to get this working but does anyone know the code for new line?

I have highligted the line in red, when you use the wizard to create a disclaimer you can have it accross multiple lines but when using powershell i have not managed to do this,

 

$DisclaimerText = This is a Disclaimer and i want this on two lines :(

$Condition1 = Get-TransportRulePredicate FromMemberOf

$Condition1.Addresses = @((Get-DistributionGroup $My Dissy groups"))

$Exception = Get-TransportRulePredicate SubjectorBodyContains

$Exception.Words = @($DisclaimerText)

$Action = Get-TransportRuleAction ApplyDisclaimer

$Action.Text = $DisclaimerText

$Action.Font = "Arial"

$Action.FontSize = "Smallest"

$Action.FontColor = "Gray"

New-TransportRule -Name "Custom Disclaimer" -Condition @($Condition1) -Exception @($Exception) -Action @($Action)

 

Any help would be appriciated.

 

Thanks

Posted

Here, this should help you out :)

 

• `0 -- Null

 

• `a -- Alert

 

• `b -- Backspace

 

• `n -- New line

 

• `r -- Carriage return

 

• `t -- Horizontal tab

 

• `' -- Single quote

 

• `" -- Double quote

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...