Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

PsObject in a String

$
0
0

this is my code
write-eventlog -computername $env:COMPUTERNAME -logname Application -source ShmeibarCheck -eventID 32 -message "Check Status of $Object.Server Status $Object.PortOpen"

and the event-log look like this
Check Status of @{Server=192.168.1.1;

How can I remove the hash and get my prop in the string ?


Viewing all articles
Browse latest Browse all 13067

Trending Articles