Hi Guys and Gals,
I have setup a Custom EXE/Script sensor to run against our ageing Exchange server, but the script is bringing back a warning error as it runs as well as the correct response (the random 3 value). I was wondering if anyone knows how to ignore the warning messages or turn them off when running my script.
PowerShell Script
#Session setup $session = New-PSSession -ConfigurationName Microsoft.exchange -ConnectionUri "http://<servername>/Powershell" -authentication Kerberos Import-PSSession -Session $session -AllowClobber |out-null #Exchange Powershell Get-MailboxFolderStatistics -Identity <mailboxname> -FolderScope Inbox | Where-Object {$_.FolderPath -eq '/Inbox'} |foreach {$_.ItemsInFolder} #End PSSession Remove-PSSession -Session $session
The warning I get back from both running manually and via PRTG is
Response not well-formed: "(WARNING: The names of some imported commands from the module 'tmp_a1g1xqsf.5mm' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. 3 )" (code: PE132)
Thanks
Andy
Add comment