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

Can't run module #1

Open
Victor833 opened this issue Sep 4, 2020 · 1 comment
Open

Can't run module #1

Victor833 opened this issue Sep 4, 2020 · 1 comment

Comments

@Victor833
Copy link

Hi there,

First of all, I would like to thank you for sharing this module with us.

I am having an issue trying to load the module. I have copied it to %programfiles%\WindowsPowerShell\Modules, but if I try to run the commands specified on readme.md file, I receive the error:

"The term 'New-PSFortigateReport' is not recognized as the name of a cmdlet"

Could you, please, help me with this?

@ricewu2020
Copy link

ricewu2020 commented Oct 3, 2020

Hi, @Victor833 , I also used the module provided by Rasli and successfully got one csv created. The others have problems.
What I did is under powershell CLI:
0. Download Powershell version 7.1

  1. Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
  2. Import-Module XXX\PSFortigateParser.psd1
    //XXX is your own path with this .psd1 in
  3. $Config = New-PSFortigateReport -Params @('XXX\firewall.conf', [System.Text.Encoding]::UTF8)
    //XXX is your own path with "firewall.conf" in
  4. $Config.savePolicyReport('XXX\firewall-policy.csv')
    //I successfully created the "firewall-policy.csv".

However, for the rest of the commands, say, $Config.saveServiceReport('XXX\firewall-service.csv'), I got the result:
ConvertTo-Csv: XXX\PSFortigateParser-master\PSFortigateParser.psm1:1804
Line |
1804 | ConvertTo-Csv -NoTypeInformation -Delimiter (Get-Culture) …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot bind argument to parameter 'InputObject' because it is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants