Skip to content

Instantly share code, notes, and snippets.

View litodam's full-sized avatar

Pablo "Lito" Damiani litodam

  • SOUTHWORKS
  • Buenos Aires, Argentina
  • X @litodam
View GitHub Profile
##
# Create new Service Principal with Cert configured
##
Login-AzureRmAccount -SubscriptionId XXXXXXXX-XXXX-XXXX-XXXX-86b9ebca2d13
# $credValue comes from the previous script and contains the X509 cert we wish to use.
# $validFrom comes from the previous script and is the validity start date for the cert.
# $validTo comes from the previous script and is the validity end data for the cert.
@litodam
litodam / Create-SelfSignedCert.ps1
Created November 15, 2016 18:27 — forked from sjwaight/Create-SelfSignedCert.ps1
Shows how we can generate a self-signed certificate for use with an Azure AD Service Principal
# Requires PowerShell to be run as Admin-level user.
New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" `
-Subject "cn=mydemokvcert" -KeyDescription "Used to access Key Vault" `
-NotBefore (Get-Date).AddDays(-1) -NotAfter (Get-Date).AddYears(2)
# PSParentPath: Microsoft.PowerShell.Security\Certificate::LocalMachine\my
#
#Thumbprint Subject
#---------- -------
// ==UserScript==
// @name GitHub plain issues list
// @namespace some namespace
// @version 0.1
// @description some description
// @match https://github.com/*
// @copyright 2014+, Jorge Rowies
// ==/UserScript==
var htmlList = "";
#NOTE: This script is based on the Microsoft provided guidance example at
# https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/.
Param(
[parameter(Mandatory=$true)]
$serviceName,
[parameter(Mandatory=$true)]
$storageAccountName,
[parameter(Mandatory=$true)]
$storageAccountKey,
@litodam
litodam / addselftosqlsysadmin.cmd
Created February 2, 2012 18:46 — forked from wadewegner/addselftosqlsysadmin.cmd
Script to add the current user to the sysadmin role in SQL Server
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.