Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.
When you echo out $test, it comes out just fine but when it is used in the below command i get an error (both are below). How can I get a multi-line variable (aka Here-String) to write to the event log?
$test = @" Test ~~~~ TEst. "@
Write-EventLog –LogName "Application" –Source "test" –EntryType "Error" –EventID 1 –Message $test
At C:\Scripts\test.ps1:9 char:112
+ ... â€“EventID 1 â€“Message $test
The string is missing the terminator: ".
+ CategoryInfo : ParserError: (:) , ParseException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfS
|change of time zone for bulk users in exchange 2013||6||23|
|NetGear Ready NAS installed, Now how to sync all exsisting data and PERMS?||7||32|
|Powershell: Add EmployeeID to existing Get-ADUser and Get-ADGroup script with multiple lines for each user||2||20|
|powerwhell : remove the CN=xxxxx only in distinguishedName||3||13|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!