-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwizpsscript.ps1
51 lines (37 loc) · 1.14 KB
/
wizpsscript.ps1
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
Param (
[Parameter(Mandatory = $true)]
[string]
$AzureUserName,
[string]
$AzurePassword,
[string]
$AzureTenantID,
[string]
$AzureSubscriptionID,
[string]
$ODLID,
[string]
$DeploymentID,
[string]
$InstallCloudLabsShadow,
[string]
$vmAdminUsername,
[string]
$trainerUserName,
[string]
$trainerUserPassword
)
Start-Transcript -Path C:\WindowsAzure\Logs\CloudLabsCustomScriptExtension.txt -Append
[Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
#Import Common Functions
$path = pwd
$path=$path.Path
$commonscriptpath = "$path" + "\cloudlabs-common\cloudlabs-windows-functions.ps1"
. $commonscriptpath
# Run Imported functions from cloudlabs-windows-functions.ps1
WindowsServerCommon
InstallCloudLabsShadow $ODLID $InstallCloudLabsShadow
CreateCredFile $AzureUserName $AzurePassword $AzureTenantID $AzureSubscriptionID $DeploymentID
Enable-CloudLabsEmbeddedShadow $vmAdminUsername $trainerUserName $trainerUserPassword
Set-ExecutionPolicy -ExecutionPolicy bypass -Force