forked from bottkars/labbuildr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.ps1
68 lines (67 loc) · 2.26 KB
/
profile.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<#$Userinterface = (Get-Host).UI.RawUI
$Userinterface.BackgroundColor = "Black"
$Userinterface.ForegroundColor = "Green"
$size = $Userinterface.BufferSize
$size.width=130
$size.height=5000
$Userinterface.BufferSize = $size
$size = $Userinterface.WindowSize
$size.width=120
$size.height=36
$Userinterface.WindowSize = $size
#>
clear-host
$self = Get-Location
import-module (Join-Path $self "vmxtoolkit") -Force -ArgumentList $self
import-module (Join-Path $self "labtools") -Force
try
{
Get-ChildItem labbuildr-scripts -ErrorAction Stop | Out-Null
}
catch
[System.Management.Automation.ItemNotFoundException]
{
Write-Warning -InformationAction Stop "labbuildr-scripts not found, need to move scripts folder"
try
{
Write-Host -ForegroundColor Gray " ==> moving Scripts to labbuildr-scripts"
Move-Item -Path Scripts -Destination labbuildr-scripts -ErrorAction Stop
}
catch
{
Write-Warning "could not move old scripts folder, incomlete installation ?"
exit
}
}
try
{
Get-ChildItem .\defaults.xml -ErrorAction Stop | Out-Null
}
catch
[System.Management.Automation.ItemNotFoundException]
{
Write-Host -ForegroundColor Yellow "no defaults.xml found, using labbuildr default settings"
Copy-Item .\defaults.xml.example .\defaults.xml
$Master_path = Join-Path $HOME "Master.labbuildr"
Set-LABMasterpath -Masterpath (Join-Path $HOME "Master.labbuildr").tostring()
Set-LABSources -Sourcedir (Join-Path $HOME "Sources.labbuildr").tostring()
}
if ((Get-LABDefaults).SQLVER -notmatch 'ISO')
{
Set-LABSQLver -SQLVER SQL2014SP2_ISO
}
$buildlab = (join-path $self "build-lab.ps1")
.$buildlab
<#write-host -ForegroundColor Yellow "Running VMware $vmwareversion"
if (!(Test-Connection community.emc.com -Quiet -Count 2 -ErrorAction SilentlyContinue))
{
Write-Warning "no Internet Connection detected or on EMC Net, Download of Sources may not work"
}
else
{
Write-host "latest updates on vmxtoolkit and labbuildr"
$Url = "https://community.emc.com/blogs/bottk/feeds/posts"
$blog = [xml](new-object System.Net.WebClient).DownloadString($Url)
$blog.rss.channel.item | where {$_.title -match "vmxtoolkit" -or $_.title -Match "labbuildr"} |select Link | ft
}#>
Get-VMX