Skip to content

Instantly share code, notes, and snippets.

View dozieaji's full-sized avatar

Shedrack dozieaji

View GitHub Profile
@dozieaji
dozieaji / utils.ps1
Created July 14, 2021 19:38 — forked from mikepfeiffer/utils.ps1
PS Function that creates an Azure Service Principal
function New-Sp {
param($Name, $Password)
$spParams = @{
StartDate = Get-Date
EndDate = Get-Date -Year 2030
Password = $Password
}
$cred= New-Object Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential -Property $spParams
@dozieaji
dozieaji / NewWebServer.ps1
Created July 14, 2021 19:37 — forked from mikepfeiffer/NewWebServer.ps1
Quick AZ PowerShell Script to Create a Web Server
param(
$Name = 'WEB1',
$Location = 'westus2',
$ResourceGroup = 'WebServers'
)
New-AzResourceGroup -Name $ResourceGroup -Location $Location
$params = @{
Name = $Name