SCVMM: mit Powershell Teil 1
Ich habe gerade das Glück etwas mehr mit Powershell und System Center Virtual Machine Manager 2012 (SCVMM, RC) zu arbeiten. Daher werde ich hier wieder ein paar Codesnippsel posten, um bestimmte Funktionen zu automatisieren:
die erste Funktion soll eine neue Cloud für Hyper-V erzeugen . Zusätzlich wird ein neue Rolle für diese Cloud angelegt, die nur VMs verwalten darf.
#creates a new cloud and a corresponding usergroup
function createCloud([string]$name,[string]$hostgroupname)
{
#retrieving first GUID for creating the new cloud
$job= ([System.Guid]::NewGuid().toString())
#define Cloud limitations (here: no limit)
Set-SCCloudCapacity -JobGroup $job -UseCustomQuotaCountMaximum $true -UseMemoryMBMaximum $true -UseCPUCountMaximum $true -UseStorageGBMaximum $true -UseVMCountMaximum $true
#setting the used network (here: the network has the same name as the cloud)
$resources = @()
$resources += Get-SCLogicalNetwork -Name $Name
#defining that the cloud can be used on hyper-v server
$addCapabilityProfiles = @()
$addCapabilityProfiles += Get-SCCapabilityProfile -Name "Hyper-V"
#adding the settings to the cloud with the defined GUID
Set-SCCloud -JobGroup $job -RunAsynchronously -AddCloudResource $resources -AddCapabilityProfile $addCapabilityProfiles
#adding the cloud to the hostgroup
$hostGroups = @()
$hostGroups += Get-SCVMHostGroup -Name $hostgroupname
#creating the cloud and the rest from the first job :-)
New-SCCloud -JobGroup $Job -VMHostGroup $hostGroups -Name $Name -RunAsynchronously
#creating the usergroup
#GUID for the second job
$job= ([System.Guid]::NewGuid().toString())
#the roleis for the newly created cloud
$scopeToAdd = @()
$scopeToAdd += Get-SCCloud -name $name
#the user of this role can start, stop and shutdown virtual machines in the cloud and start a remote control
Set-SCUserRole -JobGroup $job -AddScope $scopeToAdd -Permission @("RemoteConnect", "Shutdown", "Start", "Stop") -ShowPROTips $false
$cloud = Get-SCCloud -Name $name
#add all settings to the role
Set-SCUserRoleQuota -Cloud $cloud -JobGroup $job -QuotaPerUser -UseCPUCountMaximum -UseMemoryMBMaximum -UseStorageGBMaximum -UseCustomQuotaCountMaximum -UseVMCountMaximum
#create the role with the job guid
New-SCUserRole -Name $name -UserRoleProfile "SelfServiceUser" -Description "" -JobGroup $job
}
Die Funktion kann einfach per
SCOM: Notify by ICQ, MSN, Jabber or Facebook
On thing I was always missing in System Center Operations Manager (SCOM) was the notification with other instant messaging (IM) protocols than the build in Microsoft Communicator.
On friday I had some time to test a solution which I will describe here.
On warnung at the beginning: This current solution is experimental. It will run a Miranda client in the system context and can be a large security hole for your SCOM server!
The first thing I had to to is finding a client which can be controlled by command line or by a SDK. I stumbled upon the command line plugin for Miranda IM. Miranda IM is an open source mutli-protocol instant messaging client. With it you can integrate multiple protocols with plugins.
SCOM: Neue Management Packs Ende Oktober 2011
In den letzten 20 Tagen wurde erneut das OS Management Pack aktualisiert.
Neue Management Packs im Zeitraum zwischen 10.10.2011 und 30.10.2011
- Windows Server 2000 Operating System 6.0.6958.0
- Windows Server 2003 Operating System 6.0.6958.0
- Windows Server 2008 Operating System (Discovery) 6.0.6958.0
- Windows Server 2008 Operating System (Monitoring) 6.0.6958.0
- Windows Server 2008 R2 Best Practice Analyzer Monitoring 6.0.6958.0
- Windows Server Cluster Shared Volume Monitoring 6.0.6958.0
- Windows Server Operating System Library 6.0.6958.0
- Windows Server Operating System Reports 6.0.6958.0
- MP Guide Core OS
Diesmal gibt es keine großen Änderungen, sondern nur ein paar kleinere Korrekturen:
SCSM 2012 Beta
Für alle die schon darauf gewartet haben: Gestern Abend (deutscher Zeit) ist die öffentliche Beta vom System Center Service Manager veröffentlicht worden:
http://www.microsoft.com/download/en/details.aspx?id=27844
Kurze Lsite der Änderungen:
- Zentrale Änderung ist der neu hinzugekommene Service Katalog mit Service Requests
- Release Management
- und ein neues Self-Service Portal, dass jetzt auf Silverlight basiert.
SCCM: In WinPE fehlende Treiber ermitteln
Für die OS Installation wird in SCCM ein WinPE Bootimage eingesetzt. Über die Konsole lässt sich hier auf einfache Art und Weise zusätzliche Treiber einbinden. Relevant ist dies im Allgemeinen nur für sehr neue Netzwerk bzw. SATA Treiber, da Windows 7 von Haus aus schon sehr viele Geräte unterstützt.
Manchmal ist es schwierig den passenden Treiber zu finden. Hilfreich dabei ist die PCI Device ID. Mit dieser eindeutigen ID kann man den Hersteller (VEN_XYZ) und das entsprechende Gerät (DEV_…) über eine Google Suche ermitteln.
SCOM: Neue Management Packs Anfang Oktober 2011
Momentan scheint Microsoft fleißig bei Entwicklung von Management Packs zu sein. Ein Monat passiert nichts und jetzt schon zwei Aktualisierung von zentralen Management Packs.
Diesmal war das Active Directory MP an der Reihe:
Neue Management Packs im Zeitraum zwischen 02.10.2011 und 09.10.2011
- Active Directory Server 2000 (Discovery) 6.0.7670.0
- Active Directory Server 2003 (Discovery) 6.0.7670.0
- Active Directory Server 2003 (Monitoring) 6.0.7670.0
- Active Directory Server 2008 (Discovery) 6.0.7670.0
- Active Directory Server 2008 (Monitoring) 6.0.7670.0
- Active Directory Server Client (Monitoring) 6.0.7670.0
- Active Directory Server Common Library 6.0.7670.0
- MP Guide Active Directory Server 2000
Die Änderungen beziehen sich nur auf Bugfixes. Einer Implementierung sollte somit nichts im Wege stehen.
Danke schön!
“Liebe Microsoftler,” habe ich einen Blog Post im Juni 2009 begonnen. Und heute ist mir aufgefallen, dass der damals angemeckerte Dienst vom SCOM jetzt nicht mehr “System Center Management” heißt, sondern jetzt mit dem viel sinnvolleren Text “System Center Management Health Service” im SCOM 2012 bezeichnet ist:
Also, da man nicht nur schimpfen soll, sondern auch loben: Gut so (und ich hoffe es bleibt auch im RTM so
)
SCOM: Neue Management Packs Ende September 2011
Juhu! Endlich wieder ein paar neue Management Packs (MP) auf der SCOM 2007 Front!. Nach langem wurde wieder das Core OS MP aktualisiert.
Folgende Änderungen wurden dabei gemacht:
The September 2011 release (version 6.0.6957.0) of the System Center Monitoring Pack for the Windows Server Operating System includes the following changes:
- Optimized operating system performance collection rules.
- Added two new operating system-specific reports:
- Performance by System
- Performance by Utilization
SCOM: Nützliche SQL Abfragen
Zwischendurch ist es manchmal einfacher beim SCOM direkt die Datenbank abzufragen. Zwar bietet die Powershell auch eine einfache Zugriffsmöglichkeit, dies ist aber nicht immer der schnellste Weg.
Die Datenbankstruktur des SCOM ist relativ selbsterklärend, aber arbeitet stark mit Referenzen durch schwer lesbare GUIDs.
Um sich den Einstieg etwas zu vereinfachen wurde hier ein paar SQL Abfragen zusammengetragen: http://www.braindumpblog.co.uk/?p=61
(der Blog Post ist zwar schon relativ alt, aber stellt trotzdem noch eine gute Übersicht dar)
SCOM: Neue Management Packs Mitte September 2011
Interessant. Seit fast einem Monat gibt es keine neuen Managementpacks. Trotzdem schreibe ich hier mal diesen Post, damit man nicht glaubt, dass ich es einfach vergessen habe :-)