I have a powershell script that runs a command that extracts the available whitespace from each mail store on an exchange server. The command runs, but the format of the text looks too complex for the simple custom sensor so I changed it to display the results in XML, created a new advanced XML sensor and I get this response.
Error reading response: Junk after document element </prtg>
The bottom line is I do not understand how to format the text properly and I cant find all the answers in the documentation or on the forums. I am missing something and I am not sure what to do.
#start new remote session from powershell $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://gemini1/PowerShell/ -Authentication Kerberos #import new session Import-PSSession $Session -DisableNameChecking #Channel Definition (Not sure how to format this) $CHANNELNAME= "DB WhiteSpace" <prtg> <result> <channel>Identity</channel> </result> <result> </channel>AvailableNewMailboxSpace</channel> </result> </prtg> Get-MailboxDatabase -Status | select Identity,AvailableNewMailboxSpace | export-clixml c:\xmltest.xml Get-Content c:\xmltest.xml Exit 0