26 nov. 2011
25 nov. 2011
Compare Management Packs version on 2 management groups
The Following powershell script help you to compare management packs from 2 environments (like prod and preprod env).
In argument of the script:
In argument of the script:
- RMS Name of the 1st Management Group
- RMS Name of the 2nd Management Group
- Name of the csv file
param([string]$ref, [string]$diff, [String]$csvfile) function Connect-OpsMgr ([string] $rootMS ) { #Initializing the Ops Mgr 2007 Powershell provider if ( (Get-pssnapin | where {$_.Name -eq "Microsoft.EnterpriseManagement.OperationsManager.Client" }).Name -ne "Microsoft.EnterpriseManagement.OperationsManager.Client" ) { add-pssnapin "Microsoft.EnterpriseManagement.OperationsManager.Client" -ErrorVariable errSnapin; } Set-Location "OperationsManagerMonitoring::" -ErrorVariable errSnapin; $CS = Gwmi Win32_ComputerSystem -Comp "." #$cred=get-credential $CS.Username $mg=New-ManagementGroupConnection -ConnectionString:$rootMS -Credential:$cred -ErrorVariable errSnapin; Set-Location $rootMS -ErrorVariable errSnapin; #Checks to see if it failed or succedded in loading the provider if ($errSnapin.count -ne 0) { Write-Output "OpsMgr 2007 PSSnapin failed initialize!" Write-Output "Please verify you are running this script on a computer that have the console installed" Write-Output "Instance Maintenance Mode failed due:`nPowershell was not able to connect to OpsMgr platform.`nImpossible to put in mainteance mode the object [$Computer]::$object.`nContact SP Windows to reinstall the powershell and the OpsMgr console" "MaintenanceMode" "Error" 1000 } } #Set-Location "OperationsManagerMonitoring::" -ErrorVariable errSnapin; $cred = get-credential "Getting Management Group information for "+$ref Connect-OpsMgr $ref "Retreiving Management Packs from " + $ref $mp1=get-managementpack #$mg1=(Get-ChildItem . |where {$_.managementservername -eq $ref }).PathName #"Path" + $mg1 "Getting Management Group information for "+$diff Connect-OpsMgr $diff # $mg2=(dir |where {$_.managementservername -eq $diff }).PathName "Retreiving Management Packs from " + $diff $mp2=get-managementpack $MPREF = New-Object System.Collections.Hashtable $mp1 | % { $MPREF[$_.Name.Tostring()] = $_.Version.tostring() } $MPDIFF = New-Object System.Collections.Hashtable $mp2 | % { $MPDIFF[$_.Name.Tostring()] = $_.Version.Tostring() } $CompareMP = @() foreach ($mp in $mp1) { $count=0 $mp.Name $MPDIFF[$mp.Name] $record = New-Object System.Object if ($MPDIFF[$mp.Name] -eq $null) { $record | add-Member -memberType noteProperty -name Name -Value $mp.Name $record | add-Member -memberType noteProperty -name $ref -Value $mp.Version $record | add-Member -memberType noteProperty -name $diff -Value 'Missing' $record | add-Member -memberType noteProperty -name Sealed -Value $mp.Sealed $record | add-Member -memberType noteProperty -name "Status" -Value "Need to be installed" $CompareMP+=$record } elseif ($MPDIFF[$mp.Name.tostring()] -ne $MPREF[$mp.Name]) { $record | add-Member -memberType noteProperty -name Name -Value $mp.Name $record | add-Member -memberType noteProperty -name $ref -Value $MPREF[$mp.Name] $record | add-Member -memberType noteProperty -name $diff -Value $MPDIFF[$mp.Name] $record | add-Member -memberType noteProperty -name Sealed -Value $mp.Sealed $record | add-Member -memberType noteProperty -name Status -Value "Diff" $CompareMP+=$record } } foreach ($mpd in $mp2) { if ($MPREF[$mpd.Name.tostring()] -eq $null) { $record = New-Object System.Object $record | add-Member -memberType noteProperty -name Name -Value $mpd.Name $record | add-Member -memberType noteProperty -name $ref -Value 'Missing' $record | add-Member -memberType noteProperty -name $diff -Value $mpd.Version $record | add-Member -memberType noteProperty -name Sealed -Value $mpd.Sealed $record | add-Member -memberType noteProperty -name "Status" -Value "Need to be installed" $CompareMP+=$record } } "Exporting results to " + $csvfile $CompareMP | sort -property Name | Export-Csv -noTypeInformation -Path $csvfile
11 nov. 2011
OpsMgr2012 powershell cmdlets
With OM2012, we couple of new cmdlets has been introduced and other has been removed. You will probably have to rewrite some scripts...
70 cmdlets added
Get-SCClass
Get-SCDiscovery
Get-SCManagementGroupConnection
Get-SCManagementPack
Get-SCOMAccessLicense
Get-SCOMAgent
Get-SCOMAgentlessManagedComputer
Get-SCOMAgentManagementServerSetting
Get-SCOMAlert
Get-SCOMAlertHistory
Get-SCOMClass
Get-SCOMClassInstance
Get-SCOMCommand
Get-SCOMConnector
Get-SCOMDiagnostic
Get-SCOMDiscovery
Get-SCOMEvent
Get-SCOMGatewayManagementServer
Get-SCOMGroup
Get-SCOMMaintenanceMode
Get-SCOMManagementGroupConnection
Get-SCOMManagementPack
Get-SCOMManagementServer
Get-SCOMMonitor
Get-SCOMNotificationAction
Get-SCOMNotificationEndpoint
Get-SCOMNotificationRecipient
Get-SCOMNotificationSubscription
Get-SCOMOverride
Get-SCOMOverrideResult
Get-SCOMPendingManagement
Get-SCOMRecovery
Get-SCOMRelationship
Get-SCOMRelationshipInstance
Get-SCOMResourcePool
Get-SCOMRMSEmulator
Get-SCOMRule
Get-SCOMRunAsAccount
Get-SCOMRunAsProfile
Get-SCOMTask
Get-SCOMTaskResult
Get-SCOMUserRole
Get-SCRelationship
Get-SCRelationshipInstance
Import-SCManagementPack
Import-SCOMManagementPack
Install-SCOMAgent
New-SCManagementGroupConnection
New-SCOMManagementGroupConnection
New-SCOMResourcePool
Remove-SCManagementGroupConnection
Remove-SCManagementPack
Remove-SCOMAgentlessManagedComputer
Remove-SCOMDisabledClassInstance
Remove-SCOMManagementGroupConnection
Remove-SCOMManagementPack
Remove-SCOMResourcePool
Remove-SCOMRMSEmulator
Set-SCManagementGroupConnection
Set-SCOMAgentlessManagedComputer
Set-SCOMAgentManagementServerSetting
Set-SCOMAlert
Set-SCOMMaintenanceMode
Set-SCOMManagementGroupConnection
Set-SCOMResourcePool
Set-SCOMRMSEmulator
Set-SCOMRunAsProfile
Set-SCOMUserRole
Start-SCOMMaintenanceMode
Start-SCOMTask
List of cmdlets removed (replaced indeed) :
Get-MonitoringObjectGroup
Get-MonitoringObjectPath
Get-MonitoringObjectProperty
Get-NotificationAction
Get-NotificationEndpoint
Get-NotificationRecipient
Get-NotificationSubscription
Get-OperationsManagerCommand
Get-Override
Get-PerformanceCounter
Get-PerformanceCounterValue
Get-PrimaryManagementServer
Get-Recovery
Get-RelationshipClass
Get-RelationshipObject
Get-RemotelyManagedComputer
Get-RemotelyManagedDevice
Get-ResultantCategoryOverride
Get-ResultantRuleOverride
Get-ResultantUnitMonitorOverride
Get-RootManagementServer
Get-Rule
Get-RunAsAccount
Get-State
Get-Task
Get-TaskResult
Get-Tier
Get-UserRole
Install-Agent
Install-AgentByName
Install-ManagementPack
New-CustomMonitoringObject
New-DeviceDiscoveryConfiguration
New-LdapQueryDiscoveryCriteria
New-MaintenanceWindow
New-ManagementGroupConnection
New-MonitoringPropertyValuePair
New-Tier
New-WindowsDiscoveryConfiguration
Reject-AgentPendingAction
Remove-ConnectorFromTier
Remove-DisabledMonitoringObject
Remove-ManagementGroupConnection
Remove-RemotelyManagedComputer
Remove-RemotelyManagedDevice
Remove-Tier
Resolve-Alert
Set-AlertDestination
Set-DefaultSetting
Set-MaintenanceWindow
Set-ManagementServer
Set-ProxyAgent
Start-Discovery
Start-Task
Uninstall-Agent
Uninstall-ManagementPack
70 cmdlets added
Get-SCClass
Get-SCDiscovery
Get-SCManagementGroupConnection
Get-SCManagementPack
Get-SCOMAccessLicense
Get-SCOMAgent
Get-SCOMAgentlessManagedComputer
Get-SCOMAgentManagementServerSetting
Get-SCOMAlert
Get-SCOMAlertHistory
Get-SCOMClass
Get-SCOMClassInstance
Get-SCOMCommand
Get-SCOMConnector
Get-SCOMDiagnostic
Get-SCOMDiscovery
Get-SCOMEvent
Get-SCOMGatewayManagementServer
Get-SCOMGroup
Get-SCOMMaintenanceMode
Get-SCOMManagementGroupConnection
Get-SCOMManagementPack
Get-SCOMManagementServer
Get-SCOMMonitor
Get-SCOMNotificationAction
Get-SCOMNotificationEndpoint
Get-SCOMNotificationRecipient
Get-SCOMNotificationSubscription
Get-SCOMOverride
Get-SCOMOverrideResult
Get-SCOMPendingManagement
Get-SCOMRecovery
Get-SCOMRelationship
Get-SCOMRelationshipInstance
Get-SCOMResourcePool
Get-SCOMRMSEmulator
Get-SCOMRule
Get-SCOMRunAsAccount
Get-SCOMRunAsProfile
Get-SCOMTask
Get-SCOMTaskResult
Get-SCOMUserRole
Get-SCRelationship
Get-SCRelationshipInstance
Import-SCManagementPack
Import-SCOMManagementPack
Install-SCOMAgent
New-SCManagementGroupConnection
New-SCOMManagementGroupConnection
New-SCOMResourcePool
Remove-SCManagementGroupConnection
Remove-SCManagementPack
Remove-SCOMAgentlessManagedComputer
Remove-SCOMDisabledClassInstance
Remove-SCOMManagementGroupConnection
Remove-SCOMManagementPack
Remove-SCOMResourcePool
Remove-SCOMRMSEmulator
Set-SCManagementGroupConnection
Set-SCOMAgentlessManagedComputer
Set-SCOMAgentManagementServerSetting
Set-SCOMAlert
Set-SCOMMaintenanceMode
Set-SCOMManagementGroupConnection
Set-SCOMResourcePool
Set-SCOMRMSEmulator
Set-SCOMRunAsProfile
Set-SCOMUserRole
Start-SCOMMaintenanceMode
Start-SCOMTask
List of cmdlets removed (replaced indeed) :
Get-MonitoringObjectGroup
Get-MonitoringObjectPath
Get-MonitoringObjectProperty
Get-NotificationAction
Get-NotificationEndpoint
Get-NotificationRecipient
Get-NotificationSubscription
Get-OperationsManagerCommand
Get-Override
Get-PerformanceCounter
Get-PerformanceCounterValue
Get-PrimaryManagementServer
Get-Recovery
Get-RelationshipClass
Get-RelationshipObject
Get-RemotelyManagedComputer
Get-RemotelyManagedDevice
Get-ResultantCategoryOverride
Get-ResultantRuleOverride
Get-ResultantUnitMonitorOverride
Get-RootManagementServer
Get-Rule
Get-RunAsAccount
Get-State
Get-Task
Get-TaskResult
Get-Tier
Get-UserRole
Install-Agent
Install-AgentByName
Install-ManagementPack
New-CustomMonitoringObject
New-DeviceDiscoveryConfiguration
New-LdapQueryDiscoveryCriteria
New-MaintenanceWindow
New-ManagementGroupConnection
New-MonitoringPropertyValuePair
New-Tier
New-WindowsDiscoveryConfiguration
Reject-AgentPendingAction
Remove-ConnectorFromTier
Remove-DisabledMonitoringObject
Remove-ManagementGroupConnection
Remove-RemotelyManagedComputer
Remove-RemotelyManagedDevice
Remove-Tier
Resolve-Alert
Set-AlertDestination
Set-DefaultSetting
Set-MaintenanceWindow
Set-ManagementServer
Set-ProxyAgent
Start-Discovery
Start-Task
Uninstall-Agent
Uninstall-ManagementPack
New Virtual labs
Source http://technet.microsoft.com/nl-be/gg636841
First Look at Microsoft System Center
|
OM12 : Monitoring key Microsoft
|
Forefront Online Protection
|
System Center Orchestrator Extensibility
Learn about the extensibility of the System Center Orchestrator Beta. Take some powershell and turn it into an IP. Create a simple runbook out of it. Drive that runbook with powershell provide. Finish with creating a sharepoint web part that drives the runbook through the web service.
|
Microsoft Desktop Optimization Pack:
|
Microsoft Desktop Optimization Pack:
|
OM12: Application Monitoring
|
Deploying Applications in Windows Azure
In this hands-on lab, you will learn how to deploy your first application in Windows Azure. The lab walks through the process using a simple application named myTODO, which is a simple list creation and management application built using ASP.NET MVC. The lab shows the steps required for provisioning the required components in the Windows Azure Developer Portal, uploading the service package, and configuring the service. You will see how you can test your application in a staging environment and then promote it to production once you are satisfied that it is operating according to your expectations.
|
Deploying the Core
|
Diagnose the Application Errors
|
Advanced Deployment Scenarios
|
OM12 : Network Monitoring
|
DirectAccess and Unified Access Gateway
|
Exploring Windows Azure Storage
In this lab, examine each of the foundation storage capabilities of Windows Azure, Blobs, Tables and Queues. Discover how to create storage accounts; upload and retrieve blobs and blob metadata; create, update and query tables; and create a simple service that uses a message queue for communication.
|
Introduction to Windows Azure
In this hands-on lab, you will explore the basic elements of a Windows Azure service by creating a simple GuestBook application that demonstrates many features of the Windows Azure platform, including web and worker roles, blob storage, table storage, and queues.
|
Getting Started with
|
Getting Started with
|
iSCSI Software Target 3.3 enabling
|
Advanced Windows PowerShell Scripting
Windows 7 and Windows Server 2008 R2 bring scripting and automation to new levels through a set of production-oriented features included with Windows PowerShell 2.0, such advanced functions, modules and debugging. After completing this lab, you will be able to work with Windows PowerShell and WMI to perform systems management tasks, work with COM objects and manipulateText, XML and CSV files.
|
SCVMM Self-Service Portal 2.0
|
Inscription à :
Articles (Atom)