-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAzurestack-Kickstart.ps1
More file actions
80 lines (57 loc) · 1.82 KB
/
Azurestack-Kickstart.ps1
File metadata and controls
80 lines (57 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<#PSScriptInfo
.VERSION 1.2
.GUID a6511736-a96f-4c6f-a8f2-2f4f877627c0
.AUTHOR Karsten.Bott@labbuildr.com
.COMPANYNAME
.COPYRIGHT
.TAGS
.LICENSEURI
.PROJECTURI
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES
#>
<#
.DESCRIPTION
KickAss your Azure Stack ASDK with this kickstart
#>
[CmdletBinding(HelpUri = "https://github.com/bottkars/azurestack-dsc")]
param (
[switch]$noutils
)
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
# Check to see if we are currently running "as Administrator"
if (!$myWindowsPrincipal.IsInRole($adminRole))
{
if ($noutils.IsPresent)
{
$arguments = "-noutils"
}
$newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
$newProcess.Arguments = "-noexit $PSScriptRoot/$($myinvocation.MyCommand) $arguments"
Write-Host $newProcess.Arguments
$newProcess.Verb = "runas"
[System.Diagnostics.Process]::Start($newProcess)
exit
}
Set-Location $Home
Write-Host -ForegroundColor White -NoNewline "[==>]Disabling WIndows Update"
Start-Process "sc" -ArgumentList "config wuauserv start=disabled" -Wait -NoNewWindow
Write-Host -ForegroundColor Green "[Done]"
if (!$noutils.IsPresent)
{
$Utils = ("install-chrome","install-gitscm","Create-AZSportalsshortcuts")
foreach ($Util in $Utils)
{
Write-Host -ForegroundColor White -NoNewline "[==>]Installing $util"
Install-Script $Util -Scope CurrentUser -Force -Confirm:$false
."$util.ps1"
Write-Host -ForegroundColor Green "[Done]"
}
}
Write-Host "[==]now cloning into Azurestack Kickstart Environment[==]"
git clone https://github.com/bottkars/Azurestack-DSC