Skip to content

Instantly share code, notes, and snippets.

@kagarlickij
Last active March 19, 2019 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kagarlickij/d63a4061a1066d3a85abcc658f0856f5 to your computer and use it in GitHub Desktop.
Save kagarlickij/d63a4061a1066d3a85abcc658f0856f5 to your computer and use it in GitHub Desktop.
<#
.NOTES
===========================================================================
Created on: Jul 2017
Created by: Dmitriy Kagarlickij
Contact: dmitriy@kagarlickij.com
===========================================================================
.DESCRIPTION
ServiceFabricRPHelpers module is from: https://github.com/ChackDan/Service-Fabric/tree/master/Scripts/ServiceFabricRPHelpers
#>
Login-AzureRmAccount
if ($(Test-Path -Path "C:\Service-Fabric-master") -ne $true) {
Invoke-WebRequest -Uri https://github.com/ChackDan/Service-Fabric/archive/master.zip -OutFile "C:\Service-Fabric-master.zip"
Expand-Archive "C:\Service-Fabric-master.zip" -DestinationPath "C:\"
Remove-Item -Path "C:\Service-Fabric-master.zip"
}
Import-Module "C:\Service-Fabric-master\Scripts\ServiceFabricRPHelpers\ServiceFabricRPHelpers.psm1"
if ($(Test-Path -Path "C:\AzureCertificates") -ne $true) {
New-Item -ItemType Directory -Path "C:\" -Name "AzureCertificates"
}
Invoke-AddCertToKeyVault `
-SubscriptionId "d1b58865-90ce-447e-981d-eaca81001f58" `
-DnsName "kag-fb-cl1.westus.mydomain.com" `
-ResourceGroupName "kag-rg1" `
-Location "westus" `
-VaultName "kag-kw1" `
-CertificateName "kagcert1" `
-Password "Password" `
-CreateSelfSignedCertificate `
-OutputPath "C:\AzureCertificates" `
| Out-File "C:\AzureCertificates\certParameters.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment