mbegan / Okta-PSModule

Okta API Powershell Wrapper Module
Other
102 stars 31 forks source link

A parameter cannot be found that matches parameter name 'file'. #63

Open rob-traynere-tylertech opened 1 year ago

rob-traynere-tylertech commented 1 year ago

Attempting to run any cmdlet produces a null set and the "A parameter cannot be found that matches parameter name 'file'." warning if $file exists as a global variable.

This appears to be because line 702 is referencing the $file variable that is not set previously in the script. If $file exists from any other script, this will throw errors.

Suggesting check be removed entirely, if not necessary, or that the $file variable is initialized and scoped for use on line 702.