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/env bash | |
| # I think I'm funny. | |
| git checkout master | |
| git branch -m cableselect | |
| git push origin -u cableselect | |
| git push origin --delete master |
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
| if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) | |
| { | |
| Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; | |
| exit | |
| } | |
| Write-Output "Disabling Windows Defender" | |
| Set-MpPreference -DisableRealtimeMonitoring $true | |
| Write-Output "Uninstalling Windows Defender" | |
| Uninstall-WindowsFeature -Name Windows-Defender | |
| Write-Output "Preventing future installation of Windows Defender" |
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
| <# | |
| .SYNOPSIS | |
| Create Azure Action Group with Email Alerts | |
| .DESCRIPTION | |
| Running this script allows you to create an Azure Action Group with an Email Address | |
| This PowerShell script is released under the MIT license http://www.opensource.org/licenses/MIT | |
| .PARAMETER $emailaddress the email address to send the notifications to | |
| .PARAMETER $actionGroupName the name of the action group | |
| .PARAMETER $rgName the name of the resource group to create the action group in |
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
| $subscriptionId = "" | |
| $rg = "" | |
| $storageAccount = "" | |
| $days = 365 | |
| Add-AzLogProfile -Location 'Global' -Name ExportLogProfile -RetentionInDays $days -StorageAccountId /subscriptions/$subscriptionId/resourceGroups/$rg/providers/Microsoft.Storage/storageAccounts/$storageAccount |
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
| $resources = Get-AzResource | |
| foreach($resource in $resources) | |
| { | |
| $tags = (Get-AzTag -ResourceId $resource.Id) | |
| $tagsproperties = $tags.Properties | |
| if (!($tagsproperties.TagsProperty.ContainsKey('Creator'))) | |
| { | |
| Write-Host $resource.Name "has no creator" | |
| if ($tagsproperties.TagsProperty.ContainsKey('Owner')) | |
| { |
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
| Get-AppxPackage -AllUsers | Remove-AppxPackage | |
| $apps = Get-WmiObject -Class Win32_Product | |
| foreach ($app in $apps) | |
| { | |
| Write-Host "Uninstalling " $app.Name | |
| $app.Uninstall() | |
| } |
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
| pipeline { | |
| stages { | |
| stage('Checkout') { | |
| steps { | |
| git credentialsId: 'f73333eb-8b72-4e42-b0c6-363a9e60e830', url: 'git@github.com:PartTimeLegend/lfs.git', branch: 'master' | |
| } | |
| } | |
| stage('Install'){ | |
| steps{ | |
| bat "git lfs install" |
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
| FROM mcr.microsoft.com/windows:1909 | |
| LABEL maintainer="antony.bailey@thepoliceoftheinter.net" | |
| RUN powershell.exe -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
| RUN choco.exe install dotnetfx --version 4.7.2.20180712 --fail-on-unfound --yes --no-progress --limit-output --timeout 2700 --force | |
| RUN choco list --local-only |
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/env bash | |
| set -e | |
| REGION=$1 | |
| PROFILE=$2 | |
| SOURCE_AMI=$3 | |
| NAME=$4 | |
| # Run Instance from Base AMI | |
| echo "Creating instance from AMI $SOURCE_AMI" |
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
| $drives = (Get-PSDrive -PSProvider 'FileSystem') | |
| foreach ($drive in $drives) | |
| { | |
| Write-Host $drive "is" ($drive.Free + $drive.Used) "in size." | |
| Write-Host $drive "has" $drive.Free "free." | |
| Write-Host $drive "has used" $drive.Used | |
| } |