Skip to content

Commit

Permalink
Fix check on newrelic program installed to not display improper error…
Browse files Browse the repository at this point in the history
… message
  • Loading branch information
Julien4218 committed Feb 19, 2021
1 parent 2ef19d8 commit 0a63ba6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion recipes/newrelic/infrastructure/ohi/sql/ms-sql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ install:
remove_any_previous:
ignore_error: true
cmds:
- powershell -command '$app = Get-WmiObject -Class Win32_Product -Filter "Name = 'New Relic Infrastructure Integration, nri-mssql'"; if ($app) { $app.Uninstall() }'
- powershell -command '$app = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "*nri-mssql*"}; if ($app) { $app.Uninstall() }'

install:
label: "Installing Microsoft SQL Server integration..."
Expand Down
2 changes: 1 addition & 1 deletion recipes/newrelic/infrastructure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install:
ignore_error: true
cmds:
- powershell -command 'net stop newrelic-infra'
- powershell -command '$app = Get-WmiObject -Class Win32_Product -Filter "Name = 'New Relic Infrastructure Agent'"; if ($app) { $app.Uninstall() }'
- powershell -command '$app = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -EQ "New Relic Infrastructure Agent"}; if ($app) { $app.Uninstall() }'

install:
cmds:
Expand Down

0 comments on commit 0a63ba6

Please sign in to comment.