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
| <%@ Page Language="C#" AutoEventWireup="true" Trace="true" TraceMode="SortByCategory" %> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head runat="server"> | |
| <title>ASP.NET Diagnostic Page</title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <h2>Environment Variables</h2> | |
| <pre> |
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
| "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='\\path\to\file.zip' -dest:auto,ComputerName="https://server.domain.com:8172/msdeploy.axd?site=site.domain.com",IncludeAcls='False',AuthType='NTLM' -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParam:name='ParamName',value="ParamValue" -setParam:kind='ProviderPath',scope='ContentPath',value='site.domain.com/appname' |
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
| sqlcmd -S 'tcp:server,port' -d 'db_name' -Q 'SELECT 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
| Enable-PSRemoting -Force | |
| $credential = New-Object System.Management.Automation.PSCredential @(($AdminDomain + "\" + $AdminUsername), (ConvertTo-SecureString -String $AdminPassword -AsPlainText -Force)) | |
| Invoke-Command -FilePath $PSScriptRoot\setup-as-user.ps1 -Credential $credential -ComputerName localhost |
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
| $template = @{ | |
| '$schema' = "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#" | |
| contentVersion = "1.0.0.0" | |
| parameters = @{} | |
| variables = @{} | |
| resources = @( | |
| ) | |
| outputs = @{ | |
| example = @{ | |
| value = "[resourceGroup()]" |
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
| Add-Type -Assembly System.Security | |
| $password = "secret" | |
| # encrypt | |
| $encrypted = [System.Security.Cryptography.ProtectedData]::Protect([System.Text.Encoding]::UTF8.GetBytes($password), $null, [System.Security.Cryptography.DataProtectionScope]::LocalMachine) | |
| [System.Convert]::ToBase64String($encrypted) | Out-File "password.txt" -Encoding UTF8 | |
| # decrypt | |
| $encrypted = [System.Convert]::FromBase64String((Get-Content "password.txt")) |
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
| $msiexecArgs = @( | |
| '/i', | |
| 'INSTALLER.msi', // THIS CAN BE A URL! | |
| '/quiet', | |
| '/norestart' | |
| ) | |
| Start-Process -FilePath msiexec -ArgumentList $msiexecArgs -NoNewWindow -Wait |
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://login.microsoftonline.com/{TENANT_ID}/oauth2/authorize?response_type=id_token&client_id={CLIENT_ID}&domain_hint={DOMAIN}&redirect_uri={REDIRECT_URI} |
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
| var HttpClient = require("./HttpClient"); | |
| var client = new HttpClient.HttpClient("test-agent"); | |
| client.get('GET', 'https://www.google.com', {}, function(err, res, content) { console.log(err); console.log(content); }); |
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
| $resourceGroup = '' | |
| $storageAccount = '' | |
| $file = '' | |
| $container = '' | |
| $blob = '' | |
| $context = (Get-AzureRmStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccount).Context | |
| Set-AzureStorageBlobContent -File $file -Container $container -Blob $blob -Context $context -Force |