mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Adds Namespace argument for Get-IcingaWindowsInformation for additional filtering
Fixes #94
This commit is contained in:
parent
3e5a97d52b
commit
00be110554
2 changed files with 7 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
* [#76](https://github.com/Icinga/icinga-powershell-framework/issues/76) Adds support to test for required .NET Framework Version 4.6.0 or above before trying to install the Icinga Agent
|
* [#76](https://github.com/Icinga/icinga-powershell-framework/issues/76) Adds support to test for required .NET Framework Version 4.6.0 or above before trying to install the Icinga Agent
|
||||||
* [#87](https://github.com/Icinga/icinga-powershell-framework/issues/87) Adds wrapper command to test new code or functionality of Framework and/or plugins
|
* [#87](https://github.com/Icinga/icinga-powershell-framework/issues/87) Adds wrapper command to test new code or functionality of Framework and/or plugins
|
||||||
* [#88](https://github.com/Icinga/icinga-powershell-framework/issues/88) Adds Start/Stop timer functionality for performance analysis
|
* [#88](https://github.com/Icinga/icinga-powershell-framework/issues/88) Adds Start/Stop timer functionality for performance analysis
|
||||||
|
* [#94](https://github.com/Icinga/icinga-powershell-framework/issues/94) Adds `Namespace` argument for Get-IcingaWindowsInformation for additional filtering
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ function Get-IcingaWindowsInformation()
|
||||||
param (
|
param (
|
||||||
[string]$ClassName,
|
[string]$ClassName,
|
||||||
$Filter,
|
$Filter,
|
||||||
|
$Namespace,
|
||||||
[switch]$ForceWMI = $FALSE
|
[switch]$ForceWMI = $FALSE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -15,6 +16,11 @@ function Get-IcingaWindowsInformation()
|
||||||
'Filter', $Filter
|
'Filter', $Filter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if ([string]::IsNullOrEmpty($Namespace) -eq $FALSE) {
|
||||||
|
$Arguments.Add(
|
||||||
|
'Namespace', $Namespace
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($ForceWMI -eq $FALSE -And (Get-Command 'Get-CimInstance' -ErrorAction SilentlyContinue)) {
|
if ($ForceWMI -eq $FALSE -And (Get-Command 'Get-CimInstance' -ErrorAction SilentlyContinue)) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue