In der OM Installationsanleitung wurden alle Server-Rollen und -Features aufgelistet, die auf einem OM-Server installiert sein müssen, um den Operations Manager in vollem Umfang nutzen zu können. Um die Installation dieser Rollen und Features automatisiert durchzuführen, muss das folgende Script in einer Powershell mit erhöhten, administrativen Rechten ausgeführt werden:
#....................................BITTE LESEN....................................................
#@Unicat GmbH 2013 (RH)
#Erstelldatum: 23.1.2013
#
#
#WICHTIG: Damit die Ausführung von Powershell Scripten auf dem System möglich ist, muss die Execution
#Policy auf 'unrestricted' eingestellt sein. Um den aktuellen Stand der Execution Policy herauszufinden,
#kann das Commandlet 'Get-ExecutionPolicy' verwendet werden. Sofern die Execution Policy auf 'restricted'
#eingestellt ist, führen Sie bitte an der Konsole folgendes Kommando aus: Set-ExecutionPolicy unrestricted.
#Nach Installation der Serverrollen, kann der ursprüngliche Zustand der Execution Policy mit dem Commandlet
#'Set-ExecutionPolicy' wiederhergestellt werden.
#...................................................................................................
#Diese Funktion überprüft die Existenz des gewünschten Features, und dessen Status. Sollte das
#Feature bereits installiert sein, wird keine Aktion getätigt, ansonsten wird das Feature auf
#dem System installiert.
#
function GET-analyzeInstallFeature
{
param($FeatureName)
$oFeature = Get-WindowsFeature $FeatureName
#Check Object
if (!$oFeature) {echo ("Das Feature "+ $Featurename + " konnte auf dem System nicht gefunden werden.")}
else {
echo ('Das Feature ' + $oFeature.Name + ' wurde gefunden:')
echo $oFeature
if ($oFeature.Installed)
{
#Feature already installed Nothing to do
echo ('Das Feature ' + $oFeature.Name + ' ist bereits installiert. Keine Aktion notwendig')
} else {
#Here we call install Feature
echo ('Das Feature ' + $oFeature.Name + ' wird nun installiert, bitte Warten.')
Start-Sleep -s 4
Install-WindowsFeature $oFeature
}
}
}
#
#In der folgenden Section können Sie die Features angeben, welche installiert werden sollen.
#Der Name des Features kann mit dem Commandlet 'Get-WindowsFeature' ermittelt werden. Entnehmen
#Sie bitte den Namen des Features aus der Spalte 'NAME'
#
##################################Zu installierende Features########################################
GET-analyzeInstallFeature FileAndStorage-Services
GET-analyzeInstallFeature File-Services
GET-analyzeInstallFeature FS-FileServer
GET-analyzeInstallFeature Storage-Services
GET-analyzeInstallFeature Web-Server
GET-analyzeInstallFeature NET-Framework-Features
GET-analyzeInstallFeature NET-Framework-Core
GET-analyzeInstallFeature NET-Framework-45-Features
GET-analyzeInstallFeature NET-Framework-45-Core
GET-analyzeInstallFeature NET-Framework-45-ASPNET
GET-analyzeInstallFeature NET-WCF-Services45
GET-analyzeInstallFeature NET-WCF-TCP-PortSharing
GET-analyzeInstallFeature User-Interfaces-Infra
GET-analyzeInstallFeature Server-Gui-Mgmt-Infra
GET-analyzeInstallFeature Server-Gui-Shell
GET-analyzeInstallFeature PowerShellRoot
GET-analyzeInstallFeature PowerShell-V2
GET-analyzeInstallFeature PowerShell-ISE
GET-analyzeInstallFeature WoW64-Support
GET-analyzeInstallFeature Web-WebServer
GET-analyzeInstallFeature Web-Common-Http
GET-analyzeInstallFeature Web-Default-Doc
GET-analyzeInstallFeature Web-Dir-Browsing
GET-analyzeInstallFeature Web-Http-Errors
GET-analyzeInstallFeature Web-Static-Content
GET-analyzeInstallFeature Web-Health
GET-analyzeInstallFeature Web-Http-Logging
GET-analyzeInstallFeature Web-Performance
GET-analyzeInstallFeature Web-Stat-Compression
GET-analyzeInstallFeature Web-Security
GET-analyzeInstallFeature Web-Filtering
GET-analyzeInstallFeature Web-Windows-Auth
GET-analyzeInstallFeature Web-App-Dev
GET-analyzeInstallFeature Web-Net-Ext
GET-analyzeInstallFeature Web-Asp-Net
GET-analyzeInstallFeature Web-ISAPI-Ext
GET-analyzeInstallFeature Web-ISAPI-Filter
GET-analyzeInstallFeature Web-Mgmt-Tools
GET-analyzeInstallFeature Web-Mgmt-Console
GET-analyzeInstallFeature Web-Mgmt-Compat
GET-analyzeInstallFeature Web-Metabase
GET-analyzeInstallFeature Web-Lgcy-Mgmt-Console
GET-analyzeInstallFeature Web-Lgcy-Scripting
GET-analyzeInstallFeature Web-WMI
##################################Zu installierende Features########################################