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
# Author: Adam Rush | |
# Created on: 2016-05-28 | |
# Finds all upgradeable vShield Edges and exports CSV file to Desktop | |
$reportPath = "$HOME\Desktop\upgradable-VSEs.csv" | |
$report = @() | |
Write-Host "Searching for all vShield Edges..." -ForegroundColor Yellow | |
$edges = Get-View -ViewType virtualmachine -Property Name,Config -Filter @{'Config.VAppConfig.Product[0].Name'='vShield Edge'} | % { | |
$edge = '' | Select 'Name','Version' | |
$edge.Name = $_.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
# Variables | |
$powershellGetVersion = '1.5.0.0' # DO NOT use the latest 1.6.0 version as there is issues with this process | |
$moduleFolderPath = 'C:\path\to\PowerShell\Module\FOLDER' # only target folder, NOT the .psm1 or .psd1 | |
$repositoryName = 'psmodules' | |
$feedUsername = 'NotChecked' | |
$PAT = 'abcdefghijklmnopqrstuv1234567890' # Enter your Personal Access Token | |
$packageSourceUrl = "https://ACCOUNTNAME.pkgs.visualstudio.com/_packaging/$repositoryName/nuget/v2" # Enter your VSTS AccountName (note: v2 Feed) | |
# This is downloaded during Step 3, but could also be "C:\Users\USERNAME\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet\NuGet.exe" | |
# if not running script as Administrator. |
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
# Vars | |
$msiPath = 'C:\Users\arush\Downloads\sqlncli.msi' | |
# Definition | |
$sig = @' | |
[DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] | |
private static extern UInt32 MsiOpenPackageW(string szPackagePath, out IntPtr hProduct); | |
[DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] | |
private static extern uint MsiCloseHandle(IntPtr hAny); | |
[DllImport("msi.dll", CharSet = CharSet.Unicode, PreserveSig = true, SetLastError = true, ExactSpelling = true)] |
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
#!/bin/bash | |
# Installs Ansible AWX | |
echo "INFO: Started Installing Ansible AWX..." | |
# Install prereq: Docker SDK for Python | |
echo "INFO: Started Installing Docker SDK for Python..." | |
pip install docker | |
echo "INFO: Finished Installing Docker SDK for Python." |
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
--- | |
# Update with your Azure Service Principal credentials | |
subscription: "aaaa1111-bbbb-cccc-abcd-aaabbbcccddd" | |
client: "abcd1234-abcd-efff-1234-abcd12345678" | |
secret: "MyStrongPassw0rd!" | |
tenant: "12345678-ab12-cd34-ef56-1234abcd5678" |
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
# Install Boxstarter and Chocolatey | |
Set-ExecutionPolicy -ExecutionPolicy "RemoteSigned" -Verbose | |
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# Set Explorer options | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -DisableOpenFileExplorerToQuickAccess -DisableShowRecentFilesInQuickAccess -DisableShowFrequentFoldersInQuickAccess -DisableExpandToOpenFolder -DisableShowRibbon | |
# Set Taskbar options | |
Set-TaskbarOptions -Size Large -Lock -Dock Bottom -Combine Always |
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 | |
Configures Azure for secure Terraform access. | |
.DESCRIPTION | |
Configures Azure for secure Terraform access using Azure Key Vault. | |
The following steps are automated: | |
- Creates an Azure Service Principle for Terraform. | |
- Creates a new Resource Group. | |
- Creates a new Storage Account. |
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
#Requires -RunAsAdministrator | |
# Testing KeePass automation against KeePass v2.39.1 | |
# Vars | |
$masterKeyCredential = New-Object -TypeName 'PSCredential' -ArgumentList ('KPMasterUser', (ConvertTo-SecureString -String 'Passw0rd123!' -AsPlainText -Force)) | |
$repoPath = 'C:\Code\KeePass\KeePassDB' | |
$databaseName = 'KeePassDatabase' | |
$databasePath = Join-Path -Path $repoPath -ChildPath "$databaseName.kdbx" | |
$databaseProfileName = 'KeePassDatabaseProfile01' | |
$testGroupName = 'TestAccounts' |
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
[CmdletBinding()] | |
param ( | |
[string]$AzDOAccountName = 'adamrushuk', | |
[string]$AzDOArtifactFeedName = 'dev', | |
[string]$AzDOPat, | |
[string]$ModuleFolderPath = (Join-Path -Path $env:SYSTEM_ARTIFACTSDIRECTORY -ChildPath "PowerShellPipeline\PSModule\PSvCloud") | |
) | |
# Variables | |
$feedUsername = 'NotChecked' |
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
#!/bin/bash | |
# Set GitLab pipeline status | |
# vars | |
GITLAB_URL="https://gitlab.domain.com" | |
GITLAB_TOKEN="<your_access_token>" | |
# status can be one of: running, pending, success, failed, canceled, skipped, created, manual | |
STATUS="success" | |
# get required info |
OlderNewer