Skip to content

Commit 9f028bc

Browse files
updates to readme
1 parent 58235b9 commit 9f028bc

File tree

3 files changed

+47
-32
lines changed

3 files changed

+47
-32
lines changed

README.md

+22-14
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
# vRAGuestInstaller
22
Install guest agent on vRA 7.4/7.5 automatically....sort of
33

4-
Be sure the read the README.md in the scripts folder
4+
## REASON
5+
Each time ther is an issue with deploying a blueprint its always something with the template. For instance, vRA is upgraded or certs have changed and the agents need to be updated.
6+
Also each month the templates need to updated with the latest patches.
57

6-
# Reason
7-
Each time I have tempalte issues or we've upgrade vRA or certs have changed we need to update the agents in out Templates.
8-
On top of that we also need to update the templates to the latest patches. So I wrote a few batch files to launch on the desktop or in command line.
8+
I wrote a few scripts to automate and solve these issues quickly.
99

10-
## InstallAgentAsDarwin.bat
10+
Be sure the read the [README.md](Scripts/README.md) in the scripts folder
11+
12+
## SCRIPTS
13+
**InstallAgentAsDarwin.bat**
1114
This script id designed to install the VRA Guest Agent and VRA Appd Agent using the script provide by vRA (with little modification )
12-
1. Change the variable in the top section of the script for vRA App, mgr and cert thumbprints
13-
2. Copy entire project and subfolder to c: drive.
15+
1. Change the variables in the top section of the script for vRA App, mgr and cert thumb prints
16+
2. Copy entire project and sub folder to c: drive.
1417
3. Right click this InstallAgentAsDarwin.bat and select runas administrator
1518
4. Type in Darwins password
1619
5. shutdown when done
1720

21+
### Process:
1822
The script prompts in the beginning for the Darwin's password. After that it will auto create the account and ensure no residual account profiles exists (if deleted before).
1923
It also set the local account to not expire and as a administrator
2024
If all variables are correct, script will download and install the agents
21-
After completed, it promtps to be shutdown. If left alone for 30sec, it will auto shutdown
25+
After completed, it prompts to be shutdown. If left alone for 30sec, it will auto shutdown
2226

23-
## InstallAgentAsSYSTEM.bat
27+
**InstallAgentAsSYSTEM.bat**
2428
Does exactly as the Darwin script above does but instead uses the bulletin SYSTEMS account (no password required). Fully automated
2529

30+
##Additions
2631
In addition to the above script installing the agents, it also copied a vbscript to a scripts folder folder for vRA Guest Agent. This script I wrote to manage local user accounts settings and passwords. Its has a bunch of switches that allow you to automatically add user to admin groups and administer the admin account. This is especially useful during vRA deployment.
2732

2833
To do this
@@ -37,18 +42,21 @@ VirtualMachine.Software0.ScriptPath = cscript c:\VRMGuestAgent\scripts\UserAndGr
3742
VirtualMachine.Admin.UseGuestAgent = True
3843
`
3944

40-
- Use the /admin swithc to configure the admin account name based on what the vm has (eg. newadmin)
45+
- Use the /admin switch to configure the admin account name based on what the vm has (eg. newadmin)
4146
- in the blueprint, add the windows password property, with show in request enabled, to the virtual machine custom properties.
4247
- in the blueprint, add the UserAndGroupControl property group to the virtual machine property group section.
4348
- in the blueprint, configure the VM so it joins the domain (cloneSpec)
4449
- Publish and Entitle the blueprint
4550
- Request the item, and if done correctly the password and security group will be passed during deployment, changing the load admin password and adding the group.
51+
- If you need to debug the UserAndGroupControl vbscript, use the /debug switch. The log is place right next to the script and will display the password in plain text.
4652

4753

48-
## UninstallAgent.bat
54+
**UninstallAgent.bat**
55+
1. Change the variables in the top section of the script for fqdn and wsus info
4956
This script will remove the old Agents if they exists and delete their folders. SHould be ran before any other if doing a cleanup
50-
It will also remove the Darwin account. However since the Darwin account was running as a service, it is considered to be in use even thought the active service has been removed. So there will be a residula folder residing in C:\Users folder. The InstallAgentAsDarwin.bat scritp will clean that up before creating a new Darwin account.
57+
It will also remove the Darwin account. However since the Darwin account was running as a service, it is considered to be in use even thought the active service has been removed. So there will be a residual folder residing in C:\Users folder. The InstallAgentAsDarwin.bat script will clean that up before creating a new Darwin account.
5158

52-
## InstallUpdatesOnly.bat
59+
**InstallUpdatesOnly.bat**
5360
this script installs updates from WSUS point. It will also install PowerShell 5.1 on Windows 7, 8 , 8.1, 2012 and 2012r2. Unlike typical scripts where registry key are set.
54-
This one use LGPO.exe to build the WSUS pointer locally. I did this so that it can be viewed and changed via gpedit.msc. There are a few prerequisites that must be done. Follow the README.md in the Updates folder
61+
This one use LGPO.exe to build the WSUS pointer locally. I did this so that it can be viewed and changed via gpedit.msc. There are a few prerequisites that must be done.
62+
- Follow the [README.md](Updates/README.md) in the Updates folder

Updates/README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Files needed to Powershell 5.1
2-
W2K12-KB3191565-x64.msu
3-
Win7-KB3191566-x86.msu
4-
Win7AndW2K8R2-KB3191566-x64.msu
5-
Win8.1-KB3191564-x86.msu
6-
Win8.1AndW2K12R2-KB3191564-x64.msu
2+
- Get updates from: https://docs.microsoft.com/en-us/powershell/wmf/5.1/install-configure
3+
4+
## Required update files
5+
W2K12-KB3191565-x64.msu
6+
Win7-KB3191566-x86.msu
7+
Win7AndW2K8R2-KB3191566-x64.msu
8+
Win8.1-KB3191564-x86.msu
9+
Win8.1AndW2K12R2-KB3191564-x64.msu

scripts/README.md

+17-13
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
# Extract vRA PowerShell script from appliance for these files:
2-
`curl.exe
3-
openssl.exe
4-
prepare_vra_template.bat
5-
prepare_vra_template.ps1
6-
`
2+
`
3+
curl.exe
4+
openssl.exe
5+
prepare_vra_template.bat
6+
prepare_vra_template.ps1
7+
`
78

89
Also need LGPO.exe for WSUS policy configurations
10+
- https://www.microsoft.com/en-us/download/details.aspx?id=55319
911

1012
## Edit PowerShell Script
1113
To get the PowerShell script to properly submit using Darwin's user-name and password modify these lines in prepare_vra_template.ps1
1214

1315
Line: 549
1416
From
1517

16-
`if ($NonInteractive)`
18+
`if ($NonInteractive)`
1719

1820
to
1921

20-
`
21-
if ($NonInteractive -and !$SoftwarePassword)
22-
`
22+
`
23+
if ($NonInteractive -and !$SoftwarePassword)
24+
`
2325

2426
The add a second Else statement in betweenthe else around line: 553
2527

26-
`
27-
elseif($SoftwarePassword)
28+
`
29+
elseif($SoftwarePassword)
2830
{
2931
$SecurePassword = $SoftwarePassword | ConvertTo-SecureString -AsPlainText -Force
3032
$SoftwarePassword = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword))
3133
}
32-
`
34+
`
3335

34-
By doing this, you can now use the parameters at the very top of the script in non-interactive mode. EG:
36+
By doing this, you can now use the parameters at the very top of the script in non-interactive mode.
37+
38+
eg:
3539
`PowerShell.exe -noprofile -executionPolicy bypass -file "prepare_vra_template.ps1" -ApplianceHost vra-app.contoso.com -ManagerServiceHost vra-mgr.contoso.com -CloudProvider vSphere -SoftwareDomainUser .\Darwin -SoftwarePassword DarwinPassword -ManagerFingerprint "D4:2D:C5:BB:96:F0:A2:E1:69:96:12:C1:63:11:73:9B:FA:33:14:F4" -ApplianceFingerprint "D4:2D:C5:BB:96:F0:A2:E1:69:96:12:C1:63:11:73:9B:FA:33:14:F4" -Noninteractive -NoWindowsCheck`

0 commit comments

Comments
 (0)