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
<# | |
.DESCRIPTION | |
Outputs the SSL protocols that the client is able to successfully use to connect to a server. | |
.PARAMETER ComputerName | |
The name of the remote computer to connect to. | |
.PARAMETER Port | |
The remote port to connect to. The default is 443. |
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
# Configure the settings to use to setup this Jenkins Executor | |
$Port = 80 | |
$IPAddress = '192.168.1.96' | |
$SubnetPrefixLength = 24 | |
$DNSServers = @('192.168.1.1') | |
$DefaultGateway = '192.168.1.1' | |
# Install .NET Framework 3.5 | |
Install-WindowsFeature -Name NET-Framework-Core |
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
. .\utils.ps1 | |
Get-Command *-CosmosDb* | | |
ForEach-Object { | |
$filename = Join-Path -Path (Get-Location) -ChildPath "$($_.name).ps1" | |
"function $($_.Name)`r`n{`r`n$($_.Definition)}" | Set-Content -Path $filename -Force | |
} |
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
Remove-IscsiTargetPortal -TargetPortalAddress 192.168.129.24 -InitiatorPortalAddress 192.168.129.30 |
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
Configuration ContainerHostDsc | |
{ | |
# Set up general parameters used to determine paths where Docker will | |
# be installed to and downloaded from. | |
$ProgramFiles = $ENV:ProgramFiles | |
$DockerPath = Join-Path -Path $ProgramFiles -ChildPath 'Docker' | |
$DockerZipFileName = 'docker.zip' | |
$DockerZipPath = Join-Path -Path $ProgramFiles -ChildPath $DockerZipFilename | |
$DockerUri = 'https://download.docker.com/components/engine/windows-server/cs-1.12/docker.zip' |
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
$notNull = ($x, $y, 1 -ne $null)[0] # Null Coalescing in PowerShell |
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
$certificate = Get-ChildItem -Path Get-ChildItem -path Cert:\CurrentUser\My\D675AE3AE9F7B56348C17EE527F261CFCEA0FD13 | |
$base64certificate = @" | |
-----BEGIN CERTIFICATE----- | |
$([Convert]::ToBase64String($certificate.Export('Cert'), [System.Base64FormattingOptions]::InsertLineBreaks))) | |
-----END CERTIFICATE----- | |
"@ | |
Set-Content -Path "$ENV:USERPROFILE\Documents\MyCert.cer" -Value $base64certificate |
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
trigger: | |
branches: | |
include: | |
- 'main' | |
- 'malicious-change' | |
pr: none | |
stages: | |
- stage: Build | |
jobs: |
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
$SubscriptionId = '<subscription id>' | |
$ResourceGroupName = 'my-container-rg' | |
$AciName = 'my-container-aci' | |
$resourceId = "/subscriptions/$($SubscriptionId)/resourceGroups/$($ResourceGroupName)/providers/Microsoft.ContainerInstance/containerGroups/$($AciName)/containers/$($AciName)" | |
$command = "/zap/zap-baseline.py -t 'https://myapplication.net' -x OWASP-ZAP-Report.xml" | |
Invoke-AzResourceAction ` | |
-ResourceId $resourceId ` | |
-Action 'exec' ` | |
-ApiVersion '2019-12-01' ` |
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
#Requires -Modules @{ ModuleName = 'Az.Accounts'; ModuleVersion = '2.5.1' } | |
#Requires -Modules @{ ModuleName = 'Az.Resources'; ModuleVersion = '4.2.0' } | |
#Requires -Modules @{ ModuleName = 'Az.Compute'; ModuleVersion = '4.15.0' } | |
#Requires -Modules @{ ModuleName = 'Az.OperationalInsights'; ModuleVersion = '2.3.0' } | |
#Requires -Modules @{ ModuleName = 'Az.Aks'; ModuleVersion = '2.2.0' } | |
<# | |
.SYNOPSIS | |
Returns an array Azure Log Analytics workspaces and the resources | |
that send data to them. |
NewerOlder