powershell - check if http trace and track is disabled, else disable it.

Job ID: 33848638

Budget: $10 – $30 USD

I am trying to check if http trace is disabled on my system. If not, to go ahead and execute the command to disable it.
Below is the powershell command to check, and the output. I need help to complete this( ie If 'verb' is equals "trace", and 'allowed' is equals "false", echo ' trace is disabled', else 'disable trace'.

$setting = Get-WebConfiguration -pspath 'MACHINE/WEBROOT/APPHOST' -filter 'system.webServer/security/requestFiltering/verbs/add' | ft verb,allowed

$setting

Output:

verb allowed
---- -------
TRACE False

Also, if the output is null, we will execute command to disable track and trace
Related categories: Powershell