Skip to content

Instantly share code, notes, and snippets.

Muhammad Faizan-ul-haq faizan80

  • Tobii Tech AB
Block or report user

Report or block faizan80

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
faizan80 / create_vault.ps1
Created Nov 13, 2017
Create a Vault In Azure to store password and retrieve it to use in Credentials object. (Powershell Azure automation)
View create_vault.ps1
$password="super secret value"
$loc="chose a valid value"
New-AzureRmKeyVault -VaultName $VaultName -ResourceGroupName $ResourceGrpName -Location $loc # (This creates a vault)
$PasswordAsSecureString = ConvertTo-SecureString -String $password -AsPlainText -Force
Set-AzureKeyVaultSecret -VaultName $VaultName -Name $KeyName -SecretValue $PasswordAsSecureString
faizan80 / NumberOfRG.ps1
Last active Nov 13, 2017
Calculate number of ResourceGroups with same prefix string in name. (Microsoft Azure - Powershell)
View NumberOfRG.ps1
$existingNumberOfRGs = $(Get-AzureRmResourceGroup | Where-Object {$_.ResourceGroupName -like "$vmNamePrefix*"}).count
$nextRGNumber = $existingNumberOfRGs + 1
$rgName = $rgNamePrefix + "$nextRGNumber"
You can’t perform that action at this time.