Autor: Michel Lüscher | Datum: Donnerstag, 24. September 2009 | Kategorie:
Windows Server 2008 R2 |
Keine Kommentare »
Mit der Einführung von Windows Server 2008 wurde die zentrale Management Console, der Server Manager, eingeführt. Zur Automatisierung von Installationen, mit ServerManagerCMD.exe wurde auch eine dazu passende Command Line Version angeboten. Seit Windows Server 2008 R2 kommt nun beim Aufruf allerdings folgende Fehlermeldung Warnung:
Servermanagercmd.exe is deprecated, and is not guaranteed to be supported in future releases of Windows. We recommend that you use the Windows PowerShell cmdlets that are available for Server Manager.
Eigentlich keine Überraschung, denn Microsoft setzt in Zukunft auf die PowerShell und auch immer mehr Produkte werden mit PowerShell Modules ergänzt. Für den Server Manager gibt es seit Windows Server 2008 R2 ebenfalls die PowerShell Erweiterung. Über “Start ⇒ All Programs ⇒ Accessories ⇒ Windows PowerShell” können diese geladen werden. Oder, in einem Command Prompt “PowerShell” eingeben. Wichtig, hier wird keine neue Konsole geöffnet, einzig vor der Zeile wird bei aktivem PowerShell “PS C:\…>” angezeigt. Egal welche Variante gewählt wird, die Windows PowerShell müssen als Administrator ausgeführt werden.
Als nächstes muss das entsprechende PowerShell Modul, in diesem Fall für den Server Manager, geladen werden. Dies wird mit dem cmdlet PS> Import-Module ServerManager durchgeführt. Ab diesem Zeitpunkt stehen die neuen PowerShell Tools zur Verfügung.
Nachfolgend noch die Befehle im Überblick:
PS> Get-WindowsFeature
The Get-WindowsFeature cmdlet allows you to retrieve information about roles, role services, and features that are available on a computer that is running Windows Server 2008 R2. The cmdlet results display both those Windows features that are already installed on the computer and those that are available to install.
PS> Add-WindowsFeature
The Add-WindowsFeature cmdlet allows you to install specified roles, role services, and features on a computer that is running Windows Server 2008 R2. The Add-WindowsFeature cmdlet functions similarly to the Add Roles Wizard and Add Features Wizard that you can start from the Server Manager UI. As in those wizards, you can add more than one role, role service, or feature per session, and all roles, role services, or features that are required by those Windows features you want to install are added automatically.
PS> Remove-WindowsFeature
The Remove-WindowsFeature cmdlet allows you to remove specified roles, role services, and features from a computer that is running Windows Server 2008 R2. The Remove-WindowsFeature cmdlet functions similarly to the Remove Roles Wizard and Remove Features Wizard that you can start from the Server Manager UI. As in those wizards, you can remove more than one role, role service, or feature per session.
Weitere Informationen zu den jeweiligen cmdlets können mit PS> Get-Help cmdlet angezeigt, oder bei TechNet nachgelesen werden. Zum Beispiel für das Add-WindowsFeature.
Weitere Informationen