Answered You can buy a ready-made answer or pick a professional tutor to order an original one.
Powershell configuration script
Mark Lee is an IT technician whose supervisor has assigned the task of configuring twenty new servers, which Mark is to ship to the company’s branch offices around the country. He must configure each server to function as a file server with support for DFS and UNIX clients, a print server with support for Internet and UNIX printing, a fax server, and a secured, intranet Web/FTP server for domain users. Write a Windows PowerShell script that Mark can use to install all of the required software elements on a server.
- @
- 17 orders completed
- ANSWER
-
Tutor has posted answer for $15.00. See answer's preview
******* ********** SCRIPTS *** *** ******************** *** set ** ******** *** loops ******* ** be ********** ******** ** respective ******** ********* **** **** *** assignment ***** the ************ of *** ***** server fax and *** ******* ****** will ****** the following *** ********** ****** has **** accompanied ** **** documentSETTING *** ************ *** *** ************** powershell **** be *** ** ******** **** *** ******* ** ******* ******* ***** its *********** ** ******* *** following ******* is **** to activate ******* ** the ************************** RemoteSigned INTSTALLING *** *************** ** *** ** WORK **** **** ********* ******* *** client on *** *** ******* **** Lee has to *** ** ** *** ** them ** ****** AdminTo ***** if DFS ********* *** ********* ******** *** usedGet-windowsFeatures ******* ****** ******* ** **** ** ******* DFS ** ** is not installedInstall-WindowFeature ******* ************************************************************ ***** ******************** accompanied ** **** ******** is **** ** ********* *** *** ******* with *** ********* in all *** ****** ******* ** **** **** **** *************** ************************* namehub ******** *********** ************ *** server ***** ** the ***************************** ************ **** ** the *********** group to createPARAMETER FolderNameThe **** ** the ********** ****** to *************** ****************** name of the member computer ** ***** ** *** *** *** * ************* connectiontopology Do not ******* **** ********* *** *** ****** *** a full-mesh connectiontopologyPARAMETER ComputerNameA **** of ******** ***** ** *** ** members ** *** *********** ************** ********************** name ** *** member computer ** ***** as *** authoritative **** ****** *************************** ************** path **** ****** computers will use *** their ***** **** of *** *** ********** folderPARAMETER *********************** maximum **** in megabytes that the staging folder ***** before ******* ****** ***************** ([Parameter(Mandatory=$true *********************** ******************************************************** specify a ****** *********** ***** ******************************************************************************* ValueFromPipelineByPropertyName=$trueHelpMessage='Please specify * ********** ****** ********************************************************************************* ******************************************************** ******* a ****** ******** **** ** act as the *** *************************************************************************************** ValueFromPipelineByPropertyName=$trueHelpMessage='Please ******* a **** of member ******** ************************************************************************************* ******************************************************** ******* * ****** computer name to act ** the ******* member ****** initial replication')][ValidateNotNullOrEmpty()][string]$PrimaryComputerName [Parameter(Mandatory=$true ValueFromPipelineByPropertyName=$trueHelpMessage='Please specify * ******* folder ********************************************************************************** ******************************************************** ******* * ******* size ** megabytes for *** staging ******************************************************************************* Save ***** ********** *** **** ** *** ********* **** stop **** ****** ** the ***** ******************************* * ******************************************** * "Stop" # Save ******** ********** *** case ** dot ********* then suppress ******** messages **** the# ****************** workflow ***** ******* **** are *** ****************************** * ************************************** = *********************** *** ****************** ****************** = ************* * $HubComputerName} else ****************** * $ComputerName} if ************************************************** ****************** * ***************** + $PrimaryComputerName}# ***************** *** ******** all **** ****** ****************************** * *************** *************************************************** -and ********************* *** ****************** ******************** = $spokeComputerNames + ********************** ******************* now ******** *** spoke ****** ********* ***** **** if * hub-and-spoke# ********** topology ** desired) # ***** **** ***** *** ** ***** *** ****** ********* *********** *********************** *** ** ****** *** ***** *** ****** ********* must ** ********* *** replication"} # Check that the **** ********** cmdlets *** installed locally Note the *** ** *** **** ******* ********* ** would return an error (and *** *** ****** *** to *** ***** ******* to# $ErrorActionPreference)if ************** **************************** ****** "Please ******* *** **** ********** ****** ** *** local computer For ******* ****** 2012 R2 ** ***** *** *********************** ****************** *** ******* ** ** ***** ******** *** **** ******* from *** ********* ******** *********** ****** **** *** DFSR ********** role ** ********* on **** ****** ******** * *********** ******** ****** ******* ********* ***** checks **** ****** ** **************** Test-DfsrInstalled *********************** MemberComputerNamesA **** of computer names to verify **** *** **** **** ** ******************* *********** ************************************ "Testing if *** **** **** ** ********* on *** ****** computers: **************************** -parallel **************** ** ********************* {$installed = ****************** ****************** ************* ***************** ********************* {Write-Verbose ********* that the DFSR **** is installed ** ***************** else {throw "Please ******* *** DFSR **** ** *** ****** ******** ***** *************** ***** *********************** ****************** ************* $memberComputer'"}}}Test-DfsrInstalled $allComputerNames # Create DFSR ************* Active ********* ********** ****** * *** replication ****** ******************************* A *********** ******* name is ****** ****** the ****** ** ****** as *** container *** **** ***** **** ************* objects ** *************** ********* * new *********** ***** ***** **************** * *********************** ********** $GroupNameWrite-Output ****** Create * *** ********** ****** ** *** *********** group# -------------------------------------------------------# * replicated ******** **** ** ****** ****** *** *********** ***** It ****** ** **** container *** the **** that will ** *********************** ********* * new ********** ****** ***** ***************** = *********************** ********** ********** -FolderName *********************** ****** *** members to *** *********** ****** ************************************* * member ** a ******** **** ** involved ** * ********** replication ***** **** **** this# ********** differs **** *** ** sense; ** ****** Directory ****** ********** can be * ******* of * *********** ****************** "Adding *** following member ********* ** *** replication group named ************* ************************** * ************** ********** ********** ************* ***************************** $members # *** *********** ** *** replication ****** ***************************************** * connection ****** *********** between two members ** * *********** group It is# directional ******* ** ** ******* connection from ***** ** ***** exists but *** *********** **** ******* made ** SRV01 **** ** replicated ** ***** *** *** *** ***** way around ***** ******* ** not ** ***** ***** the ****************** ****** adds two *********** **** in# **** ********** by ******* Each ** the ********** demonstrated **** *** ************** connections ** it **** not ***** **** but ** ** ** important ************* when ********* ****** topologiesif ****************** {# A ************* topology is ***** * hub member ********** **** ***** other ****** ** **** *********** group **** ***** ******** ** ** ****** **** **** ** created on *** **** ****** *** ** ********** *** ** spoke ******* ******** *** ***** **** this ******* **** ** ******** to *** ******** hub membersWrite-Verbose ************ * hub-and-spoke connection **************** ******************* in $spokeComputerNames) ************** "Adding ************* *********** between *** *** ****** ******** ***** ************ *** *** ****** ******** ***** $spokeComputerName"$connection * ****************** ********** ********** ******************* $HubComputerName ************************ ****************************** ************* **** ** * ********* topology ** where *** ******* ********* with every other ****** ** **** *********** group It ** useful when ***** *** ten or ***** membersWrite-Verbose ************ * ********* ********** ************ ($i * * ** *** ********************** * ***** **** ($j * ** * * * ** -lt ********************** ; $j++) ************** ******** ************* *********** ******* *** ****** computers ***** *** *** {1}" -f $allComputerNames[$i]$allComputerNames[$j])$connection * ****************** -GroupName ********** ******************* ********************* ************************ ********************************* ***************** Set *** ******* **** *** staging quota on all ************ ********************************************************** * ********** ******** *** *************** ******** *** * replicated ****** **** ** ********** ****** ** created or * member ** added ** * *********** ***** *** ********** *** created on **** member for **** ********** ****** ***** is ** need ** *** a *********** explictly *** ** cannot ** ******* by itself *** ****** as **** ** *** ********** ****** **** *** ****** *** * part of the *********** ******** *** ******* **** ** the ******** of a ****** ********** local **** ** * ********** ******** *** ******* quota ** the ******* **** **** *** ******* ****** ***** ****** purging *** oldest# files This ******* is **** ********* ** *** staging ******* *********** ** *** service# configuration ******** ****************************** The *********** ***** *** *** ******** quota *** ******* ****** **** ** ** * ** or the **** ** *** 32 ******* ***** in the# replicated folder ********* is ******** **** *** prefer ***** ********** ********* ** **** ******** ********* ** ******************* ******* *** ******* ******** ** used here *** ******* For ***** **** wish to ********* ***** ****** *** additional ******** ********** to *** ****************** ****** ***** ***** opportunities *** ********* *** ************* ** **** ****** ** **** ** *** *** of# splattingif ($StagingPathQuotaInMB *** ** ************** ******** *** ******* **** ** ************** *** the ******* **** ***** ** ********************* MB *** *** following member computers: $allComputerNames"$memberships = Set-DfsrMembership ********** ********** *********** *********** ************* $allComputerNames -ContentPath ************ -StagingPathQuotaInMB ********************* ******* **** ************** ******** *** ******* **** ** ************** *** *** following member ********** ****************************** = Set-DfsrMembership -GroupName ********** *********** $FolderName ************* ***************** ************ $ContentPath -Force}Write-Output *************** Set *** ******* ******* *********************** *** ******* ****** *** the ************* **** ** data ** its ******* **** **** ***** **** primary ********** **** of *** **** ** *** replicated ****** **** win ********* ******* ******* ***************** ("Setting *** ******* ****** to ** *** ******** ***** **** -f *********************************** * ****************** ********** $GroupName *********** *********** ************* $PrimaryComputerName ************** ***** -ForceWrite-Output ***************** ****** *** ***** **** of **** ************* on all ******** *********************************************************** **** ** ************* ** ****** ** **** ****** *** ******* ******* ***** **** update the# **** AD objects ** avoid ******* *** an ********* refresh **** ******* ****** **** *********** ** *** member ********************** "Updating ** ************* on ****** ********** ************************************************ ************* ****************************** ************** ******** ******* event **** **** ** ******* ** **** *********** ****** ******** **** it ********* ******* ****** ******* *********************** * $prevErrorActionPreference$ProgressPreference * ********************************** * ***** ******** ******* * ***** ****** the ********* ********* **** ** ** ****************** ***** ** *** *** ******** *** printer ****** ******* ****** also ** ********** The printer ****** ******** should **** ** ************ ****** printer_configps1 *********** ** **** ******** ** ****************** CreatePrinter ******** * ************** * ******************************************************************************** * ********************** = ******************** = ******************** * ********************** * ********************* * ********************** = ****************************** CreatePrinterPort ******** * ************* * *********************************************************************************** $args[1]$portSNMPEnabled=$false$portProtocol=1$portHostAddress= $args[2]$portPut()} CreatePrinterPort ********* nrbp0105 nrbp0105CreatePrinter ********* "The **** ** the printer installed" ******** ******** ******* ******* ************************ OF *** ******* fax ****** ** ********* and ********** ****** the same ** *** ******* using *** ****** ***** installations *** ********** ****** is ******************************** servermanageradd-windowsfeature ********** ********************************** servermanageradd-windowsfeature ********** Web-WebServer Web-SecurityWeb-Filtering INSTALLING * *************** ******* ****** *** ****** ********** installation of *** The ********* ****** is used ** ******* *** server to **** **** other ****** ***** *** script *** *** ****** name *** ***** constraints **** ** *** serverThe ****** ************ **** ******** is ******************** ****** ** setup *** share ** ******************* = ******************** * **** ** *** ****** to be shared *** NFS$NFSShare = ********** # *** share **** *** **** **** ** ***** *** **** ***** section#Import-Module ************* Add-WindowsFeature *************************** ***** (!(Test-Path $NFSFolder)) ********* ********* ********* ***** *********************** ***** $NFSShare ***** $NFSFolder$ShareName * ***************** * “:/” * $NFSShare ******* name configurationWrite-Output “NFS ***** *** **** ******** *************