Skip to content

Instantly share code, notes, and snippets.

View ecalder6's full-sized avatar

Eric Calder ecalder6

  • Google
  • Kirkland, WA
View GitHub Profile
function Set-ScheduleWorkflow ($admin_username, $admin_password, $manual_install) {
$script_name = "setup2.ps1"
$url = "https://raw.githubusercontent.com/ecalder6/azure-gaming/master/$script_name"
Write-Output "Downloading second stage setup script from $url"
$webClient.DownloadFile($url, "C:\$script_name")
$powershell = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
$service_name = "SetupSecondStage"
Write-Output "Creating a service $service_name to finish setting up"
Disable-Devices
Disable-TCC
Enable-Audio
Install-VirtualAudio
@ecalder6
ecalder6 / setup.ps1
Last active September 5, 2018 22:06
if ($windows_update) {
Update-Windows
}
Update-Firewall
Disable-Defender
Disable-ScheduledTasks
Disable-IPv6To4
if ($manual_install) {
Disable-InternetExplorerESC
Edit-VisualEffectsRegistry
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.8",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(parameters('scriptLocation'), '/', variables('ScriptFolder'), '/', variables('ScriptFileName'))]"
],
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File ', variables('scriptFolder'), '/', variables('scriptFileName'), ' ', variables('scriptParameters'))]"
"hardwareProfile": {
"vmSize": "Standard_NV6"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2016-Datacenter",
"version": "latest"
},