This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Login-AzureRmAccount -Credential $Creds | |
$Params = @{"Param1" = "Value1";"Param2" = "Value2"} | |
$job = Start-AzureRmAutomationRunbook -Name $Name -ResourceGroupName $ResourceGroupName -AutomationAccountName $AutomationAccountName -Parameters @params | |
Error: | |
"Start-AzureRmAutomationRunbook : Missing an argument for parameter 'Parameters'. Specify a parameter of type 'System.Collections.I | |
Dictionary' and try again." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": {}, | |
"variables": { | |
}, | |
"resources": [ | |
{ | |
"type": "Microsoft.Compute/availabilitySets", | |
"name": "{{ avset_name }}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev -y | |
sudo apt-get install libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev -y | |
sudo apt-get install libcurl4-openssl-dev python-software-properties libffi-dev -y | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev -y | |
#Note that this key may changes | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
#if this command fails, you should get a message containing the correct gpg command to run instead of the above |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Create the following Word Macro: | |
Sub InsertMultipleImages() | |
Dim fd As FileDialog | |
Dim oTable As Table | |
Dim sNoDoc As String | |
Dim vrtSelectedItem As Variant | |
Dim Counter As Integer | |
If Documents.Count = 0 Then | |
sNoDoc = MsgBox(" " & _ | |
"No document open!" & vbCr & vbCr & _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Inner | |
{ | |
[CmdletBinding()] | |
Param () | |
Try | |
{ | |
throw "Inner exception" | |
} | |
Catch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Module PowerShellGet | |
#File PSModule.psm1 | |
#Bug causes publish-module to fail if user has a profile with spaces in it ("C:\users\sam smith") | |
#Replace line 6817 with the following: | |
Microsoft.PowerShell.Management\Start-Process -FilePath "$script:NuGetExePath" ` | |
-ArgumentList ('push "' + $NupkgPath + '"' + " -source $Destination -NonInteractive -ApiKey $NugetApiKey") ` | |
-RedirectStandardError $tempErrorFile ` | |
-RedirectStandardOutput $tempOutputFile ` | |
-NoNewWindow ` | |
-Wait |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!powershell | |
# <COPYRIGHT> | |
# <CODEGENMETA> | |
# | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# <COPYRIGHT> | |
# <CODEGENMETA> | |
# | |
# This file is part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install git python-setuptools python-dev sshpass libffi-dev libssl-dev make libxml2-dev libxslt1-dev acl build-essential -y | |
sudo easy_install pip | |
sudo pip install paramiko PyYAML jinja2 httplib2 requests lxml cssselect xmltodict sphinx | |
sudo pip install pywinrm | |
sudo pip install requests==2.13.0 | |
sudo pip install packaging | |
#In order to build docs: | |
sudo apt-get install asciidoc -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using System.Net; | |
public static void Run(string myEventHubMessage, TraceWriter log) | |
{ | |
String data = myEventHubMessage; | |
log.Info($"C# Event Hub trigger function processed a message: {data}"); | |
data = data.Replace("http://schemas.microsoft.com", ""); |