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


createCloud "MeineCloud" "Alle Hosts"

aufgerufen werden.

Posted in Deutsch, Hyper-V, Powershell, System Center, Virtual Machine Manager | Tagged , | Leave a comment

SCOM: Neue Management Packs Mitte November 2011

Damit man nicht denkt, dass ich die Management Packs (MP) vergessen habe, aber es gibt nichts zu berichten.

Neue Management Packs im Zeitraum zwischen 31.10.2011 und 22.11.2011:

  • Nix Neues von der SCOM MP Front…
Posted in Deutsch, Operations Manager | Tagged , | Leave a comment

SCOM: Notify by ICQ, MSN, Jabber or Facebook

aimOn 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.

Continue reading

Posted in English, Operations Manager, System Center | Tagged , , , , | 2 Comments

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

Diesmal gibt es keine großen Änderungen, sondern nur ein paar kleinere Korrekturen:

  • Disabled BPA Rules by default.
  • Added appropriate SQL Stored Procedures credentials
  • Updated Knowledge of Logical Disks
  • Updated Overrides for Logical Disks
Posted in Deutsch, Operations Manager, System Center, Uncategorized | Tagged , | Leave a comment

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.

 

Posted in Deutsch, System Center | Tagged | Leave a comment