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
| # vSphere 6.5 VCSA - REST API testing | |
| $vCenterName = 'YOURNAMEHERE' | |
| $BaseURI = "https://$vCenterName/rest" | |
| # At first, I could only make this work with vSphere SSO credentials | |
| # Try that if AD auth is throwing 401 Unauthorized errors at you | |
| # (Discovered later that it didn't like the colon in my AD user's password) | |
| # Can also try "https://YOURVCENTER/apiexplorer" in your browser to test login creds | |
| $c = Get-Credential -UserName 'administrator@vsphere.local' -Message 'Enter password' |
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
| # SQL Server - do this early to avoid issues with newer versions of VC++ 2015 redist | |
| choco install sql-server-2017 | |
| choco install sql-server-2017-cumulative-update | |
| choco install sql-server-management-studio | |
| # tools | |
| choco install git | |
| choco install nodejs | |
| choco install tortoisegit | |
| choco install vscode |
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
| # Start-FileSystemWatcher.ps1 - File System Watcher in Powershell. | |
| # Brought to you by MOBZystems, Home of Tools | |
| # https://www.mobzystems.com/code/using-a-filesystemwatcher-from-powershell/ | |
| [CmdletBinding()] | |
| Param( | |
| # The path to monitor | |
| [Parameter(Mandatory=$true, Position=0)] | |
| [string]$Path, | |
| # Monitor these files (a wildcard) |
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 -version 4.0 | |
| #https://gist.github.com/jdhitsolutions/f0415db6bc8dc6236fb3 | |
| <# | |
| A PowerShell workflow to download Sysinternals tools from web to a local folder. | |
| Last updated: February 15, 2016 | |
| version : 2.1 |
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
| # https://docs.gitlab.com/ee/api/projects.html | |
| # https://docs.gitlab.com/ee/api/issues.html | |
| # https://docs.gitlab.com/ee/api/notes.html | |
| # Project List | |
| $r = Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'='xxxxx' } -Uri http://xxxxx/api/v4/projects/ | |
| $r | Sort-Object -Property id | Format-Table -Property id, name | |
| # Issues List | |
| $r = Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'='xxxxx' } -Uri http://xxxxx/api/v4/projects/<xx>/issues |
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
| Windows 10 post install script | |
| Please see post_install_part1.ps1 and post_install_part2.ps1 for details | |
| Part 1 - Fix Privacy, Explorer, Logon and misc windows settings | |
| ---------------------------------------------------------------------------------------------------------- | |
| Disable-UAC | |
| Disable-UpdateRestart | |
| Disable-Autoplay |
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
| # | |
| # Gitlab clone script | |
| # | |
| # Author: PM | |
| # Date: 2019-10-18# | |
| # | |
| [CmdletBinding(DefaultParameterSetName = 'all')] | |
| param ( | |
| [Alias('ID')] | |
| [Parameter(ParameterSetName="id")] |
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
| $token = "" | |
| $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f "azdo",$token))) | |
| $uri = "https://dev.azure.com/{organisation}/{teamproject}/_apis/wit/wiql?api-version=5.1" | |
| $body = @" | |
| { | |
| "query": "Select [System.Id], [System.Title], [System.State] From WorkItems | |
| Where [System.TeamProject] = {teamproject} AND [System.WorkItemType] <> 'Test Case' | |
| asof '2020-01-08T10:00:00.000Z'"} |
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 Import-Script { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory)] | |
| [String] $Path, | |
| [Hashtable] $Parameters = @{}, | |
| [Object[]] $Arguments = @(), | |
| [String] $EntryPoint = 'Main' | |
| ) |
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
| # Adds BeforeAll at the top of Tests file to make it follow Pester v5 recommendation of putting | |
| # all code into Pester controlled blocks. | |
| # DO this: | |
| # BeforeAll { | |
| # . $PSScriptRoot/Code.ps1 | |
| # } | |
| # DO this: | |
| # BeforeAll { |
NewerOlder