Coder Social home page Coder Social logo

gabrielsroka / powershell-sample-scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andyclarke-okta/powershell-sample-scripts

0.0 2.0 0.0 16 KB

Sample scripts using Powershell for Identity Management on the Okta Platform

PowerShell 100.00%

powershell-sample-scripts's Introduction

Powershell-Sample-Scripts

Sample Powershell scripts for Identity Management on the Okta Platform

These scripts are Unofficial code designed to get you started with managing your Okta tenent via PowerShell

System Requirements

Powershell can be installed on Windows, Linux and macOS.

It is recommended that your Powershell environment is at version 5. To determine which version of PowerShell you're running, see PSVersion under $PSVersionTable.

Getting Started

Most of the scripts are self contained and don't require external libraries. A few scripts leverage an external library. See "Other Resources". You can dtermine which method works best for your needs.

The scripts require tht you specify;

# Site config
$org = "https://subdomain.oktapreview.com"
$token="00FTs0L6e_TtBh7oWqV-xxxxxxxxxxxxxxxx"


#config home folder
$homeFolder = "C:\repos\sw_Powershell\sw_UserImport";
#setup input file
$inputFile = "$homeFolder\SampleImport_SHA256_10.csv";


#setup output file headers
$timestamp = Get-Date -uFormat "%Y%m%d%H%M%S";
$success = "$homeFolder\Successfull_ProcessUser_$timestamp.csv";
$failCreate = "$homeFolder\Failed_CreateUser_$timestamp.csv";
$failUpdate = "$homeFolder\Failed_UpdateUser_$timestamp.csv";
"email,firstName,lastName,customId,city,dateOfBirth,hashPassword,hashSalt" |Out-File $success
"email,firstName,lastName,customId,city,dateOfBirth,hashPassword,hashSalt" |Out-File $failCreate
"email,firstName,lastName,customId,city,dateOfBirth,hashPassword,hashSalt" |Out-File $failUpdate

Other Resources

Some of the scripts use a Powershell library (OktaAPI.psm1) created to facilitate API features

https://github.com/gabrielsroka/OktaAPI.psm1

https://www.powershellgallery.com/packages/OktaAPI

To Install on PowerShell 5:

PS> Install-Module -Name OktaAPI -Scope CurrentUser This command will install the powesrshell module in your local store found at; $HOME\Documents\WindowsPowerShell\Modules

PS> Install-Module -Name OktaAPI -Scope AllUsers -AllowClobber This command will install the powesrshell module in your global store found at; C:\Program Files\WindowsPowerShell\Modules

Other sample scripts can be found at;

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Note: Contributing is very similar to the Github contribution process as described in detail here.

powershell-sample-scripts's People

Contributors

andyclarke-okta avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.