I hereby claim:
- I am gravejester on github.
- I am okallstad (https://keybase.io/okallstad) on keybase.
- I have a public key ASBM-6vpDIBHoXbDogydKGLwjT3NC_7iy7EtFJ6ApHawSwo
To claim this, I am signing this object:
| #!/bin/bash | |
| SP_NAME=$1 | |
| SP_PW=$2 | |
| SP_TENANT=$3 | |
| # Authenticate to Azure | |
| if [ -z "$SP_NAME" ] || [ -z "$SP_PW" ] || [ -z "$SP_TENANT" ] | |
| then | |
| LOGIN_RESULT=$(az login) |
| @echo off | |
| IF [%1]==[] ( | |
| IF [%2]==[] ( | |
| IF [%3]==[] ( | |
| az login | |
| ) | |
| ) | |
| ) ELSE ( | |
| az login --username %1 --password %2 --tenant %3 --service-principal | |
| ) |
| [System.Diagnostics.CodeAnalysis.SuppressMessage('AvoidUsingPlainTextForPassword', '', Target='ProcessParameter')] | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter()] | |
| [Alias('SPName','Username','un')] | |
| [string] $ServicePrincipalName, | |
| [Parameter()] | |
| [Alias('SPPassword','Password','pw')] | |
| [string] $ServicePrincipalPassword, |
| [CmdletBinding(DefaultParameterSetName = 'Credential')] | |
| param ( | |
| [Parameter(ParameterSetName = 'Credential')] | |
| [System.Management.Automation.PSCredential] $Credential, | |
| [Parameter(ParameterSetName = 'ClearText')] | |
| [string] $ApplicationId, | |
| [Parameter(ParameterSetName = 'ClearText')] | |
| [string] $Password, |
| adm cmd: | |
| install node for windows | |
| - node v6.10.3 | |
| - npm 3.10.10 | |
| cd c:\..\..\EditorSyntax | |
| npm init |
| function Update-AzureRmTag { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName, Position = 0)] | |
| [string[]] $ResourceId, | |
| [Parameter()] | |
| [hashtable] $Tags = [hashtable]::new() | |
| ) |
I hereby claim:
To claim this, I am signing this object:
| function Get-CRC32 { | |
| <# | |
| .SYNOPSIS | |
| Calculate CRC. | |
| .DESCRIPTION | |
| This function calculates the CRC of the input data using the CRC32 algorithm. | |
| .EXAMPLE | |
| Get-CRC32 $data | |
| .EXAMPLE | |
| $data | Get-CRC32 |
| # Add custom type with static method | |
| Add-Type -MemberDefinition @" | |
| public static string SayHello() | |
| { | |
| string Hello = "Hello"; | |
| return Hello; | |
| } | |
| "@ -Name Stuff -Namespace My | |
| # Define custom function calling my custom type |
| function Test-WebRequest { | |
| <# | |
| .SYNOPSIS | |
| Test web request. | |
| .DESCRIPTION | |
| This function can be used to test a web request to a URI. It functions similarly to Test-Path and will either return | |
| True or False. | |
| .EXAMPLE | |
| Test-WebRequest 'google.com' | |
| This should return True. |