Happy | Holidays |
---|---|
Happy | Newyear |
Almost | 2019 |
*** | *** |
This file contains 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 New-AzureRmAutomationRunbookschedule { | |
<# | |
.SYNOPSIS | |
This function creates a onetime runbookschedule and registers it to a runbook. | |
.DESCRIPTION | |
A unique name is created with a parameter and a number. | |
This name is used for a new schedule. | |
The schedule will be registered to a runbook. | |
.PARAMETER AutomationAccount | |
The name of the Automation Account where the runbook is and the schedule will be. |
This file contains 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
<# | |
.SYNOPSIS | |
This script removes expired schedules from a runbookaccount. | |
.DESCRIPTION | |
The script finds schedules that were scheduled onetime and don't have a next runtime. | |
All schedules that meet the criteria will be removed. | |
.EXAMPLE | |
.\Remove-OldSchedules.ps1 -AutomationAccountName "OGD-EUW-AUT-OPL-AUTOMATION-01" | |
.NOTES | |
Script was created to be used as a scheduled runbook. |
This file contains 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 gar { | |
param( | |
[Parameter(Mandatory = $false)] | |
[String]$Name | |
) | |
if ($Name) { | |
get-azresource -Name $Name | Select-Object Name, Type | |
} | |
Else { | |
get-azresource | Select-Object Name, Type |
This file contains 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 is called at bottom of the script for the scheduled task. | |
Function Get-PwshUpdates { | |
param ( | |
[Parameter()] | |
[Switch]$Preview | |
) | |
$PwshName = "PowerShell 6-x" | |
$Metadata = Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json | |
$PwshRelease = $Metadata.ReleaseTag -replace '^v' | |
if ($Preview) { |
This file contains 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
$URL = "Paste the Logic App URL here" | |
$Body = [PSCustomObject]@{ | |
To = "Ex@mp.le" | |
Subject = "Subject of the mail" | |
Body = "Body (you can use HTML here if you like)" | |
} | |
# Create a line that creates a JSON from this object | |
$JSONBody = $Body | ConvertTo-Json |
This file contains 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/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"storageAccountPrefix": { | |
"type": "string" | |
}, | |
"location": { | |
"type": "string", | |
"defaultValue": "[resourceGroup().location]", |
This file contains 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
####################################### | |
#Monitor DFSR replication | |
#Created by: Barbara Forbes | |
#Date: 26-2-2016 | |
#################################### | |
#The account running this script needs to have permissions on the drives that are used for this test. | |
#Define Paths on both servers, change this to your situation | |
$DFSpath1 = "c:\test" |
This file contains 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 New-AzUpdateDeploymentSchedule { | |
<# | |
.SYNOPSIS | |
Schedule Azure updates | |
.DESCRIPTION | |
This cmdlet combines the three cmdlets that are needed to create a update schedule. | |
New-AzAutomationSchedule | |
New-AzAutomationUpdateManagementAzureQuery | |
New-AzAutomationSoftwareUpdateConfiguration | |
Created for Azure Update Automation. |
This file contains 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
# This is a basic workflow to help you get started with Actions | |
name: Deploy_ARM | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
[push, pull_request] | |
OlderNewer