This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Usage | |
| # GUI that saves and encrypts credentials that generate Bearer Token (Run this once per app registration) | |
| # If application-only Graph API Permision, click "Export Tenant Config" button | |
| # If also (or only) delegate permissions click both "Export Tenant Config" and "Export Tenant Credentials" buttons | |
| # Copy the last command output from the GUI. This is how you connect each time. | |
| Add-GraphConfig -Tenant Contoso -workload DescribePermissions | |
| # GUI will provide exactly what to use to connect | |
| Connect-Graph -Tenant Contoso -Workload DescribePermissions #use -Delegated switch if needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Connect-GraphRefresh { | |
| [CmdletBinding()] | |
| param ( | |
| ) | |
| if (-not $Delegated) { | |
| Connect-Graph -Tenant $Script:Tenant -Workload $Script:Workload -Delegated:$Script:Delegated | |
| } | |
| else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Connect-Graph { | |
| <# | |
| .SYNOPSIS | |
| Connect to Graph with delegate or application only permissions | |
| .DESCRIPTION | |
| Connect to Graph with delegate or application only permissions | |
| .PARAMETER Tenant | |
| ** Use NameOfTenant if the tenant domain is NameOfTenant.onmicrosoft.com ** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Add-GraphConfig { | |
| <# | |
| .SYNOPSIS | |
| Create the encrypted file needed to connect to Microsoft Graph using: Connect-Graph | |
| .DESCRIPTION | |
| Create the encrypted file needed to connect to Microsoft Graph using: Connect-Graph | |
| .PARAMETER Tenant | |
| use NameOfTenant if the tenant domain is NameOfTenant.onmicrosoft.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Hide-PSGCalendar { | |
| <# | |
| .SYNOPSIS | |
| if Owner of Calendar... | |
| 1. Remove as Owner from Calendar, if not chosen by client in PrimaryOwnerFilePath | |
| 2. Add as Editor to Calendar | |
| 3. Hide Calendar if #1 and #2 does not work | |
| .DESCRIPTION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # BEGIN ROOT CA | |
| # Common name used for the RootCA. example: 'Contoso Root CA' | |
| $CACommonName = 'SE-C-ROOT' | |
| # Suffix for the RootCA. Example: 'OU=PKI,O=Contoso,C=US' | |
| $CADistinguishedNameSuffix = 'OU=PKI,O=Contoso,C=US' | |
| # Local directory where Root CA stores the CA Database | |
| $DatabaseDirectory = 'C:\CADB\CertDB' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Import-Module "$PSScriptRoot\..\Module\WindowsPresentationFramework" -Force | |
| . "$PSScriptRoot\WindowsPresentationFramework.ps1" | |
| #Region ThreadSafe | |
| # Bind Variables | |
| [WindowsPresentationFrameworkThreadSafe()] | |
| [PSObject] $Variable = "Herro World from Proxy Scope" | |
| [WindowsPresentationFrameworkThreadSafe()] | |
| $Sync = [hashtable]::Synchronized(@{}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"> | |
| <Obj RefId="0"> | |
| <TN RefId="0"> | |
| <T>System.Collections.Hashtable</T> | |
| <T>System.Object</T> | |
| </TN> | |
| <DCT> | |
| <En> | |
| <S N="Key">SourceApp</S> | |
| <Obj N="Value" RefId="1"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Connect-OktaSecure { | |
| param ( | |
| [Parameter(Mandatory)] | |
| [String] $Tenant, | |
| [Parameter()] | |
| [switch] $DeleteCreds, | |
| [Parameter()] | |
| [switch] $Preview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-OktaUserReport { | |
| <# | |
| .SYNOPSIS | |
| Searches for specific or all Okta Users | |
| .DESCRIPTION | |
| Searches for specific or all Okta Users. Use no parameters to return all users. e.g Get-OktaUserReport | |
| .PARAMETER SearchString | |
| Queries firstName, lastName, and email for a match to the -SearchString value specified. |