Downloads of v


Last Update:

10 Dec 2014

Package Maintainer(s):

Software Author(s):

  • Okta


okta sdk api authentication identity management powershell module

Okta PowerShell Module

This is not the latest version of Okta PowerShell Module available.

  • 1
  • 2
  • 3 | Updated: 10 Dec 2014



Downloads of v



Software Author(s):

  • Okta

  • 1
  • 2
  • 3
Okta PowerShell Module

This is not the latest version of Okta PowerShell Module available.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed

Validation Testing Unknown

Verification Testing Passed


Scan Testing Successful:

No detections found in any package files


Deployment Method: Individual Install, Upgrade, & Uninstall

To install Okta PowerShell Module, run the following command from the command line or from PowerShell:


To upgrade Okta PowerShell Module, run the following command from the command line or from PowerShell:


To uninstall Okta PowerShell Module, run the following command from the command line or from PowerShell:


Deployment Method:

📝 NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to

2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade okta.core.automation -y --source="'INTERNAL REPO URL'" --version="''" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade okta.core.automation -y --source="'INTERNAL REPO URL'" --version="''" 

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0

Exit $exitCode

- name: Install okta.core.automation
    name: okta.core.automation
    version: ''
    state: present

See docs at

chocolatey_package 'okta.core.automation' do
  action    :install
  source   'INTERNAL REPO URL'
  version  ''

See docs at

cChocoPackageInstaller okta.core.automation
    Name     = "okta.core.automation"
    Version  = ""
    Source   = "INTERNAL REPO URL"

Requires cChoco DSC Resource. See docs at

package { 'okta.core.automation':
  ensure   => '',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',

Requires Puppet Chocolatey Provider module. See docs at

4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator purity on 11 Dec 2014.


This package allows you to build on Okta's identity platform using PowerShell.

# choco install Okta.Core.Automation -source '%cd%'

$packageName = 'Okta.Core.Automation'
$folder = "$($Home)\Documents\WindowsPowerShell\Modules\$($packageName)"

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
Set-Location $scriptPath

function Unblock-File {
    [cmdletbinding(DefaultParameterSetName="ByName", SupportsShouldProcess=$True)]
    param (
        [parameter(Mandatory=$true, ParameterSetName="ByName", Position=0)] [string] $FilePath,
        [parameter(Mandatory=$true, ParameterSetName="ByInput", ValueFromPipeline=$true)] $InputObject
    begin {
        Add-Type -Namespace Win32 -Name PInvoke -MemberDefinition @"
        [DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        private static extern bool DeleteFile(string name);
        public static int Win32DeleteFile(string filePath) {
            bool is_gone = DeleteFile(filePath); return Marshal.GetLastWin32Error();}
        [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        static extern int GetFileAttributes(string lpFileName);
        public static bool Win32FileExists(string filePath) {return GetFileAttributes(filePath) != -1;}
    process {
        switch ($PSCmdlet.ParameterSetName) {
            'ByName'  {$input_paths = Resolve-Path -Path $FilePath | ? {[IO.File]::Exists($_.Path)} | Select -Exp Path}
            'ByInput' {if ($InputObject -is [System.IO.FileInfo]) {$input_paths = $InputObject.FullName}}
        $input_paths | % {     
            if ([Win32.PInvoke]::Win32FileExists($_ + ':Zone.Identifier')) {
                if ($PSCmdlet.ShouldProcess($_)) {
                    $result_code = [Win32.PInvoke]::Win32DeleteFile($_ + ':Zone.Identifier')
                    if ([Win32.PInvoke]::Win32FileExists($_ + ':Zone.Identifier')) {
                        Write-Error ("Failed to unblock '{0}' the Win32 return code is '{1}'." -f $_, $result_code)

try {
	nuget install Okta.Core.Client -pre

	if(Test-Path -Path .\packages) {
		# Copy the Okta.Core.Client
		Copy-Item .\packages\Okta.Core.Client*\lib\* .\bin\

		# Copy all the files from the net40 folders to bin
		Copy-Item .\packages\*\*\net40\* .\bin\

		# Remove packages
		Remove-Item .\packages -recurse -force
	else {
		# Copy the Okta.Core.Client
		Copy-Item .\Okta.Core.Client*\lib\* .\bin\

		# Copy all the files from the net40 folders to bin
		Copy-Item .\*\*\net40\* .\bin\

	# Copy all the files to the Modules location
	if(!(Test-Path -Path "$($folder)")) {
		New-Item -ItemType directory -Path "$($folder)"

	# Copy the psd1
	Copy-Item .\Okta.Core.Automation.psd1 "$($folder)"

	# Copy all the dlls
	if(!(Test-Path -Path "$($folder)\bin")) {
		New-Item -ItemType directory -Path "$($folder)\bin"
	Copy-Item .\bin\* "$($folder)\bin"

	# Unblock all the dlls
	Get-ChildItem "$($folder)\bin" | Unblock-File

	# the following is all part of error handling
	Write-ChocolateySuccess "$($packageName)"
} catch {
	Write-ChocolateyFailure "$packageName" "$($_.Exception.Message)"
$packageName = 'Okta.Core.Automation'
$folder = "$($Home)\Documents\WindowsPowerShell\Modules\$($packageName)"

try {
	Remove-Item "$($folder)" -recurse -force
	Write-ChocolateySuccess $packageName
} catch {
	Write-ChocolateyFailure $packageName "$($_.Exception.Message)"
    <add key="repositoryPath" value=".\packages" />

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
Okta PowerShell Module 390 Monday, October 10, 2016 Approved
Okta PowerShell Module 320 Thursday, October 6, 2016 Approved
Okta PowerShell Module 380 Monday, September 12, 2016 Approved
Okta PowerShell Module 848 Wednesday, December 10, 2014 Approved

Beta release - Do not use in production environments. This library is subject to substantial change.

Discussion for the Okta PowerShell Module Package

Ground Rules:

  • This discussion is only about Okta PowerShell Module and the Okta PowerShell Module package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Okta PowerShell Module, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus