Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-IcingaCheckDirectory doesn't work without filename parameter #154

Closed
bieba opened this issue Mar 22, 2021 · 0 comments · Fixed by #155
Closed

Invoke-IcingaCheckDirectory doesn't work without filename parameter #154

bieba opened this issue Mar 22, 2021 · 0 comments · Fixed by #155
Assignees
Labels
bug Something isn't working

Comments

@bieba
Copy link

bieba commented Mar 22, 2021

The function Invoke-IcingaCheckDirectory doesn't work if you call it without the parameter FileNames set.

Expected Behavior

If you call the function without any filename it should simply return all files within the directory.

Current Behavior

It returns nothing, which is wrong. The directory does contain files.

Possible Solution

Either set it as a mandatory parameter or initialize it with '*' as default.

Steps to Reproduce (for bugs)

  1. Make a directory with at least one file in it
  2. Use-Icinga
  3. Invoke-IcingaCheckDirectory -Path 'C:\PowerShell-Transcription\Processing-Suspicious'
  4. (works:) Invoke-IcingaCheckDirectory -Path 'C:\PowerShell-Transcription\Processing-Suspicious' -FileNames '*'

Context

I want to count the files within the directory.

Your Environment

PowerShell Plugins Version 1.3.1

  • PowerShell Version used ($PSVersionTable.PSVersion):
PS H:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.610
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.610
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
  • Operating System and version (Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption):
Version    BuildNumber Caption
-------    ----------- -------
10.0.19042 19042       Microsoft Windows 10 Pro
@LordHepipud LordHepipud self-assigned this Apr 23, 2021
@LordHepipud LordHepipud transferred this issue from Icinga/icinga-powershell-framework Apr 23, 2021
@LordHepipud LordHepipud added the bug Something isn't working label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants