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
// Use the Microsoft Graph Bicep extension to work with Entra ID resources | |
extension microsoftGraphV1 | |
// The Service Principal of the Azure Machine Learning service. | |
resource azureMachineLearningServicePrincipal 'Microsoft.Graph/servicePrincipals@v1.0' = { | |
appId: '0736f41a-0425-4b46-bdb5-1563eff02385' // Azure Machine Learning service principal | |
} | |
// The existing Azure AI Search service (can be a new or existing resource). | |
resource azureAiSearch 'Microsoft.Search/searchServices@2025-02-01-preview' existing = { |
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
<# | |
.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 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
# 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 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
. .\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 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
Remove-IscsiTargetPortal -TargetPortalAddress 192.168.129.24 -InitiatorPortalAddress 192.168.129.30 |
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
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 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
$notNull = ($x, $y, 1 -ne $null)[0] # Null Coalescing in PowerShell |
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
$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 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
trigger: | |
branches: | |
include: | |
- 'main' | |
- 'malicious-change' | |
pr: none | |
stages: | |
- stage: Build | |
jobs: |
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 = '<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' ` |
NewerOlder