powershell error Skip to main content
https://support.okta.com/help/answers?id=9062a000000bm9lqaq&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
John GriffinJohn Griffin 

powershell error

When using the powershell module I receive this message:

Cannot validate argument on parameter 'oOrg'. The Org:prod is not defined in the Okta_org.ps1 file

However my Okta_org.ps1 file looks like this:
<# Okta_org.ps1 #>
# Verbose will print various informative messages
[Boolean]$oktaVerbose = $true
# define the default Okta Org you want to use, useful if you have more than one.
[String]$oktaDefOrg = "prod"

[Hashtable]$oktaOrgs = @{
                    prod = [Hashtable]@{
                            baseUrl  = [String]"https://blanked.okta.com"
                            secToken = [String]"hex blanked"
                            enablePagination = [boolean]$true
                            pageSize = [int]500
                           }
                    }

Did I miss something? (Probably did, I always do)

Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi John
I just tried it, and it worked fine for me. Did you try restarting PowerShell? When you import-module, it stays in memory until you remove-module and re-import it. Also, did you check the readme on:
https://github.com/mbegan/Okta-PSModule

Please note, too, that this is not the official Okta PowerShell Module. That one can be found here:
http://developer.okta.com/code/dotnet/