This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Array of Domain Controller Server Names | |
$DCs = @("DC01","DC02","DC03") | |
# Database Server | |
$dbServer = "sql2012-03" | |
# Database Name | |
$databaseName = "pcDemo_Personnel" | |
# Production System User Table Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$nodeName = "SQL03" | |
Configuration SQL2014 { | |
param ($nodeName) | |
Node $nodeName { | |
#region Set Parameters | |
$isoName = "en_sql_server_2014_enterprise_edition_x64_dvd_3932700.iso" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Active Directory Module for PowerShell feature needs to be installed | |
# spAccounts.csv can be downloaded from: http://1drv.ms/1bHTZC0 | |
Import-Module ActiveDirectory -EA 0 | |
# Create AD Users and Groups | |
#region Parameters | |
$file = "C:\DevOps\Microsoft\SQL Server 2014\config\spAccounts.csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$domain = "contoso.local" | |
$newName ="SQL03" | |
$OUPath = # to put computer in specific OU | |
$prefixLength = 24 # PrefixLength of 24 equals a subnet mask of 255.255.255.0 | |
# Update Description | |
Write-Host -ForegroundColor Green "Updating server description..." | |
$desc = Get-WmiObject -Class Win32_OperatingSystem | |
$desc.Description = $newName | |
$desc.put() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$serverName = "SQL03" | |
$vmName = "3- SQL03" | |
$vmDest= "G:\VMs\$serverName\" | |
$isoName = "z_Master-Server2012R2-Standard.vhdx" | |
$isoPath = "D:\_Images\" | |
# VM Host Name | |
$computerName = "Host-HP-01" | |
# Network | |
$switchName = "pcDemo-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Create Server 2012R2 Features Array | |
function getServer2012R2Features { | |
$windows2012R2Features = @( | |
"Application-Server", | |
"AS-NET-Framework", | |
"AS-Web-Support", | |
"FileAndStorage-Services", | |
"Storage-Services", | |
"Web-Server", | |
"Web-WebServer", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module BitsTransfer | |
$destPath = "C:\tempDownloads" # Change this to desired download destination path | |
$destPath = $destPath.TrimEnd('\') | |
#region validate download path | |
function validatePath($destFolder){ | |
## Check that the path entered is valid | |
If (!(Test-Path $destFolder -Verbose)) { | |
New-Item -Path $destFolder -ItemType Directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set varibles | |
$sp2016Location = "D:\" # Change to folder location of SharePoint prerequisiteinstaller.exe file | |
$destPath = "C:\tempDownloads" | |
$sp2016preReqPath = Get-Content "$destPath\sp2016preReqPath.txt" | |
Import-Module Servermanager | |
#region Create variable paths and copy files | |
$sp2016preReqPath = $sp2016preReqPath.TrimEnd('\') | |
$sp2016Location = $sp2016Location.TrimEnd('\') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$destPath = "C:\tempDownloads" | |
$sp2016preReqPath = Get-Content "$destPath\sp2016preReqPath.txt" | |
Start-Process "$sp2016preReqPath\PrerequisiteInstaller.exe" -ArgumentList ("/continue /unattended") -Wait |
OlderNewer