This file contains 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
# Linear Regression Model | |
$modelAlgorithm = 'glm' | |
# Time Series Data | |
$dataCSV = "C:\data\A2B-AX-3y.csv" | |
$sourceData = Import-Csv $dataCSV | |
# Last Record as Prediction data | |
$dataPredict = Import-Csv -Path $dataCSV | Select-Object -Last 1 | export-csv ./dataPredict.csv |
This file contains 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
# Default H2O AI Server running locally via Start-H2O | |
$url = "http://localhost:54321/3/{0}" | |
# Neural net algorithm for determining Iris type | |
$modelAlgorithm = 'deeplearning' | |
# Get Iris Training data and put on the local filesystem | |
Invoke-RestMethod -Method Get 'https://raw.githubusercontent.com/DarrenCook/h2o/bk/datasets/iris_wheader.csv' | out-file ./iris_wheader.csv | |
# Prediction Column | |
$predictValues = 'class' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# Invite User Request | |
$inviteDetails = @{ | |
"invitedUserEmailAddress" = $externalEmail.otherMails[0] | |
"invitedUser" = @{"id" = $updatedUser.id } | |
"sendInvitationMessage" = $true | |
"inviteRedirectUrl" = "https://myapps.microsoft.com?ResourceTenantName.com" | |
"invitedUserMessageInfo" = @{ | |
"messageLanguage" = "en-AU" | |
"customizedMessageBody" = "Hi $($updatedUser.displayName), Your user account '$($updatedUser.userPrincipalName)' in the Contoso Azure Tenant has been migrated to a Guest account federated to your Fabrikam '$($updatedUser.otherMails[0])' account. After selecting 'Get Started' below you will be able to access Contoso using your Fabrikam account and credentials. All you access and privilages remain intact. Regards, Contoso IT" | |
} |
This file contains 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 MSAL.PS -RequiredVersion 4.7.1.1 | |
$tenantID = "myTenant.onmicrosoft.com" | |
$clientID = "yourRegistedAppID" | |
$clientSecret = (ConvertTo-SecureString "yourRegistedAppSecret" -AsPlainText -Force) | |
$accessToken = Get-MsalToken -clientID $clientID -clientSecret $clientSecret -tenantID $tenantID -ForceRefresh | Select-Object -Property AccessToken | |
$users = Invoke-RestMethod -Headers @{Authorization = "Bearer $($accessToken.AccessToken)" } ` | |
-Uri 'https://graph.microsoft.com/v1.0/users' ` |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# Creds | |
$tenantID = 'yourAADTenantID' | |
$clientID = 'aadAppID' | |
$clientSecret = (ConvertTo-SecureString 'aadAppSecret' -AsPlainText -Force) | |
$accessToken = Get-MsalToken -clientID $clientID -clientSecret $clientSecret -tenantID $tenantID | Select-Object -Property AccessToken | |
# MS Graph Apps URI | |
$aadAppsURI = 'https://graph.microsoft.com/v1.0/applications' | |
# Get Expiring Creds in x Days | |
$expiryCheck = 60 |
This file contains 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
$TenantId = 'yourAzureTenantID' | |
$loggingClientID = 'AzureADLoggingAppClientID' | |
$loggingSecret = 'AzureADLoggingAppClientSecret' | |
$logAnalyticsWorkspace = 'yourLogAnalyticsWorkspaceID' | |
$customLogName = "ourAppCustomLogs_CL" | |
# Get Access Token for Log Analytics to allow KQL Queries to get last ingested events in Custom Logs | |
$loginURL = "https://login.microsoftonline.com/$TenantId/oauth2/token" | |
$resource = "https://api.loganalytics.io" | |
$authbody = @{grant_type = "client_credentials"; resource = $resource; client_id = $loggingClientID; client_secret = $loggingSecret } |
This file contains 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 UniversalDashboard.Community | |
import-Module UniversalDashboard.UDFinancialChart | |
Get-UDDashboard | Stop-UDDashboard | |
$Theme = New-UDTheme -Name "darrenjrobinson" -Definition @{ | |
'.dropdown-content' = @{ | |
'min-width' = '450px' | |
} | |
'.btn-floating' = @{ |
This file contains 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
# Document IdentityNow Email Templates Configuration | |
import-module SailPointIdentityNow | |
Get-IdentityNowOrg | |
Set-IdentityNowOrg -orgName 'yourOrgName' | |
$orgName = (Get-IdentityNowOrg).'Organisation Name' | |
$utime = [int][double]::Parse((Get-Date -UFormat %s)) | |
# Get All Notification Templates | |
$getEmailTemplate = Invoke-IdentityNowRequest -uri "https://$($orgName).api.identitynow.com/cc/api/emailTemplate/list?_dc=$($utime)&filter=%7Bproperty%3A%20%22name%22%2C%20operation%3A%20%22EQ%22%2C%20value%3A%22Pending%20Access%20Request%20Cancelled%22%7D" -method get -headers Headersv3_JSON |