Error in policypv.log after upgrade to ConfigMgr 2012 R2

Ran into an interesting error today after updating ConfigMgr 2012 SP1 to ConfigMgr 2012 R2. The hierarchy is a CAS and 3 primary sites (but I do not believe that the error is releated to having multiple primary sites). *** insert DepPolicyAssignment (PADBID, PolicyAssignmentID, PolicyID, DepPADBID, DepPolicyAssignmentID, DepPolicyID, IsTombstoned, LastUpdateTime) values (67118015, N'{ccff0eb1-db33-49c3-9dd3-c704c3a638f8}', N'PS120012-PS10013D-6F6BCC28', 67689129, N'{060a13d7-7ed8-46ae-927f-4420b0fefdcb}', N'DEP-PS120012-PS1002B1-6F6BCC28', 0, GetUTCDate()) *** [23000][547][Microsoft][SQL Server Native Client 11.0][SQL Server]The INSERT statement conflicted with the FOREIGN KEY constraint "DepPolicyAssignment_1_FK". The conflict occurred in database "CM_PS1", table "dbo.PolicyAssignment", column 'PADBID'. Failed to create policy and policy assignment based on package PS1002B1, program * and offer [...]

By |2013-11-12T20:32:56+01:00november 12th, 2013|Configuration Manager (SCCM)|1 Kommentar

Upgrade to SCOM 2012 R2: Unable to proceed

  The upgrade time has truly come!   During an upgrade at a costumer site I got the following error when trying to upgrade the secondary management server:   Unable to Proceed Setup could not detect the current Data Warehouse Scenario. Please ensure that the SQL Server service for the Data Warehouse is running, and the current user has permission to access the Data Warehouse.     I checked the services and I had already upgraded the RMS emulator server so i was sure it wasn’t a permission issue.   Time to dig a little deeper…   I start by [...]

By |2013-11-07T11:05:07+01:00november 7th, 2013|Operations Manager (SCOM)|5 Comments

Who started the runbook from the orchestration console? Use this runbook!

I have had this question again and again and again… and again… Unfortunately the orchestration console does not show which user did trigger the runbook. But this does not mean that it is not logged, you can actually use it as a filter in the console:   The user SID is in the “CreatedBy” field, but if you check the database, only the SID is saved. So you will have to use the user objectSID in the filter, if you want to filter the jobs.   But this makes it possible for us to get the user info from the [...]

By |2013-11-04T18:56:40+01:00november 4th, 2013|Automation|3 Comments

SCO/SCOM 2012: Get Alerts / Monitor Alerts – How to Filter on empty/null property

When using orchestrator, a lot of activities contain a filter Get Alert / Monitor Alert is some of them. The following workaround is tested for the above 2 activities, but i think it does apply to other filter activities too. (have not had the time to test yet, comments are welcomed!).   I ran into an unexpected behavior today: I was using a filter saying “TicketId Does not equal No Automatic Escalation”, and i was expecting to get alle alerts that did not have this text in the field. but I did not get all of them!. I only got [...]

Autogrowth Setting in SCOM 2012 R2 are pretty static

After running System Center Operations Manager 2012 R2 for a week, I began getting these errors: Ops DB Free Space Low – And amazingly the default setting on the Operations Manager database are Autogrowth = None, which will work in a production environment for about 17 minuttes. So remember to change this when you do the installation or afterwards – by changing the InitialSize (MB) to appr 50 GB (The largest OperationsManager database I’ve ever seen at a customer where 180GB)       Change it according to your database size calculations or at least!!   Have a great day [...]

By |2013-10-25T10:11:43+01:00oktober 25th, 2013|Operations Manager (SCOM)|2 Comments

Modify Maintenance Windows with Configuration Manager cmdlets

One of the new features in Configuration Manager 2012 R2 is that you can configure Maintenance Windows only for Software Updates We can configure all these new stuff with ConfigMgr cmdlets also :) #Import ConfigMgr PSH Module Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") #Get the CMSITE SiteCode $SiteCode = Get-PSDrive -PSProvider CMSITE # Change the connection context Set-Location "$($SiteCode.Name):\" #Apply MW only to Task Sequence $Collection = Get-CMDeviceCollection -Name "MW 2 - LOB Servers" Set-CMMaintenanceWindow -CollectionID $Collection.CollectionID -ApplyToTaskSequenceOnly -Name "TEST 2" #Apply MW only to Software Updates $Collection = Get-CMDeviceCollection -Name "MW 2 - LOB Servers" Set-CMMaintenanceWindow -CollectionID $Collection.CollectionID -ApplyToSoftwareUpdateOnly -Name "TEST 2" #Modify [...]

By |2013-10-18T09:28:43+01:00oktober 18th, 2013|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Modify Maintenance Windows with Configuration Manager cmdlets

Create Maintenance Windows with Configuration Manager cmdlets

Configuration Manager 2012 R2 PowerShell module contains now New-CMMaintenanceWindow cmdlet :) #Import ConfigMgr PSH Module Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") #Get the CMSITE SiteCode $SiteCode = Get-PSDrive -PSProvider CMSITE # Change the connection context Set-Location "$($SiteCode.Name):\" #Occurs day 3 of every 2 months effective 10/17/2013 1:00 PM $Schedule = New-CMSchedule -DurationCount 1 -DurationInterval Hours -RecurCount 2 -DayOfMonth 3 -Start ([Datetime]"13:00") $Collection = Get-CMDeviceCollection -Name "MW 1 - Windows Servers" New-CMMaintenanceWindow -CollectionID $Collection.CollectionID -Schedule $Schedule -Name "TEST 1" #Occurs the First Thursday of every 2 months effective 10/17/2013 1:00 PM $Schedule = New-CMSchedule -DurationCount 1 -DurationInterval Hours -RecurCount 2 -DayOfWeek 4 -WeekOrder First -Start [...]

New cmdlets in Configuration Manager 2012 R2

Here are the new cmdlets in Configuration Manager 2012 R2. Now we have totally 560 cmdlets Copy-CMClientAuthCertificateProfileConfigurationItem Copy-CMRemoteConnectionProfileConfigurationItem Copy-CMTrustedRootCertificateProfileConfigurationItem Copy-CMVpnProfileConfigurationItem Copy-CMWirelessProfileConfigurationItem Get-CMAccessLicense Get-CMClientAuthCertificateProfileConfigurationItem Get-CMClientOperations Get-CMDeviceVariable Get-CMInitialModifiableSecuredCategory Get-CMMaintenanceWindow Get-CMRemoteConnectionProfileConfigurationItem Get-CMRemoteConnectionProfileConfigurationItemXmlDefinition Get-CMTrustedRootCertificateProfileConfigurationItem Get-CMVhd Get-CMVpnProfileConfigurationItem Get-CMWirelessProfileConfigurationItem Invoke-CMClientNotification Invoke-CMContentValidation Invoke-CMDeviceRetire Invoke-CMDeviceWipe Move-CMObject New-CMClientAuthCertificateProfileConfigurationItem New-CMDeviceVariable New-CMMaintenanceWindow New-CMRemoteConnectionProfileConfigurationItem New-CMTrustedRootCertificateProfileConfigurationItem New-CMVhd New-CMVpnProfileConfigurationItem New-CMWirelessProfileConfigurationItem Publish-CMPrestageContentTaskSequence Remove-CMClientAuthCertificateProfileConfigurationItem Remove-CMContentDistribution Remove-CMDeviceVariable Remove-CMMaintenanceWindow Remove-CMRemoteConnectionProfileConfigurationItem Remove-CMTrustedRootCertificateProfileConfigurationItem Remove-CMVhd Remove-CMVpnProfileConfigurationItem Remove-CMWirelessProfileConfigurationItem Set-CMAssignedSite Set-CMClientAuthCertificateProfileConfigurationItem Set-CMDeviceOwnership Set-CMDeviceVariable Set-CMMaintenanceWindow Set-CMRemoteConnectionProfileConfigurationItem Set-CMTrustedRootCertificateProfileConfigurationItem Set-CMVhd Set-CMVpnProfileConfigurationItem Set-CMWirelessProfileConfigurationItem Get-CMInitModifiableSecuredCategory

SCO 2012 – Attention! Use correct order of params in Invoke Web Services XML Payload!

Are you experiencing problems when using advanced SOAP XML payloads in “Invoke Web Services”? I did! it seems to work properly, but some parameters did not get filled correctly. After some testing i discovered that the parameters in the XML payload has to be in the correct order!! If not, the parameters “in between” will be filled by NULL, and then later it will ignore or skip the rest of the parameters if they appear in the wrong order!! The reason is that it is using the DataContractSerializer. thanks to by colleague Claus for finding this forum thread there they [...]

By |2013-10-15T15:11:04+01:00oktober 15th, 2013|Automation|1 Kommentar

Configure Coretech Application E-Mail Approval tool to always use the fallback mail

As you can read in this blog post – we recently released a new version of our E-Mail approval tool. One of the new features in the tool is to configure a fallback address. You can either specify a Manager as the approver or a fallback group like Servicedesk. In order to configure the tool to always use the fallback address follow these steps: Open C:\Program Files (x86)\coretech\Coretech Application Approval Service Edit the CM_AppReqListen.exe.config.xml file Find the Section in called <setting name="UseManager" serializeAs="String"> Change <value>True</value> to <value>False</value> Save and close the file Restart the Coretech CM Application Request Listener service

By |2013-10-15T14:50:00+01:00oktober 15th, 2013|Configuration Manager (SCCM), General info, Tools|12 Comments

Quick and Dirty – Build Configuration Manager 2012 Admin Console Extensions automatically

I just finished one PowerShell script that queries all the Admin Console XML files and it creates automatically Admin Console Extension. You can use this script to locate correct place for you right-click tool. There are totally 655 Console GUIDs. You can download the script from here  

By |2013-10-15T13:27:20+01:00oktober 15th, 2013|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Quick and Dirty – Build Configuration Manager 2012 Admin Console Extensions automatically

Can you combine Get-WmiObject with ConfigMgr cmdlets? Yes, you can

Last week I discovered that you can create a Refresh Schedule with New-CMSchedule cmdlet and then you can easily use that object with Get-WmiObject cmdlet to query and modify for example Device Collection Refresh Schedule. Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") $SiteCode = Get-PSDrive -PSProvider CMSITE Set-Location "$($SiteCode.Name):\" $Schedule = New-CMSchedule -RecurCount 2 -RecurInterval Days $Collection = Get-WmiObject -Namespace "Root\SMS\Site_PS1" -Class SMS_Collection -Filter "Name='Windows 8.1 OSD'" $Collection.RefreshType = 2 $Collection.RefreshSchedule = $Schedule.psbase.ManagedObject $Collection.Put() You can create the Device Collection with correct Refresh Schedule but Set-CMDeviceCollection cmdlet does not allow to change the Refresh Schedule. $Schedule = New-CMSchedule -RecurCount 2 -RecurInterval Days New-CMDeviceCollection -Name "Windows [...]

By |2013-10-14T10:28:47+01:00oktober 14th, 2013|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Can you combine Get-WmiObject with ConfigMgr cmdlets? Yes, you can

Coretech Application E-Mail Approval Tool

A little over a year ago we released the first version of our Application E-mail approval utility. Ever since our first release we have received lots of positive feedback and ideas to new features. Most of the ideas are implemented in this new release. Thanks for all the feedback and please keep it coming. This blog post will explain how you can install CTAA (Coretech Application Approval tool) – Download Additional blog posts will follow and explain how you can customize the tool. Why the need for this utility The idea with this utility is to integrate a “real approval [...]

By |2017-09-13T11:42:26+01:00oktober 11th, 2013|Configuration Manager (SCCM), General info, Tools|168 Comments

Configuration Items and Baselines, Using Scripts (Powershell Example)

In the previous blog post i used file and registry settings for my Configuration Item. Another way to define your Configuration Item setting are scripts. And in CM2012 we have 3 scripting options: JScript PowerShell VBScript (The same goes for the use of scripts in Detection Methods when we create Application Deployment Types.)   Since the new colour fashion in scripting today is blue, i guess the popular choice would be PowerShell. On a serious note – PowerShell is now everywhere, just ask my buddy Kaido Järvemets. And in this example i will be checking for a setting on the [...]

Configuration Items and Baselines, Example: SCEP Client Compliance

This example will show you a way to get compliance data from your clients regarding the System Center Endpoint Protection 2012 Client. Now, I'm aware that we through CM2012 reports and console views already have good tools to monitor the client states in regard to SCEP - but lets say you have another antimalware product and would like some compliance info from the clients inserted into CM2012 that you then can use to create reports etc. The principals are the same. First of all you will need to create configuration Items in the CM2012 Console - these items will hold [...]

Case of the missing Hardware Inventory

I recently played around with adding registry data to SCCM Hardware Inventory using RegKeyToMof, but during the tests I ended up with a big problem, no clients were delivering any hardware inventory at all. The problem quickly spread to all clients so I started the oh-so well known journey of troubleshooting. First let’s look at the symptoms of the issue. The Resource Explorer shows no inventory data for clients Client Actions does not show the Hardware Inventory Action The PolicyEvaluator.log file contains errors A Bad MOF file is generated on the client Things that did not work I tried replacing [...]

By |2013-10-01T20:57:39+01:00oktober 1st, 2013|Configuration Manager (SCCM)|10 Comments

The Coretech Software Update Management Tool

As demonstrated @TechEd in Australia and New Zealand our latest free tool is the Software Update Management Tool. The sole purpose of the tool is to automate the creation of software update deployments. The benefits of using the tool are: All deployments will be using the same naming standard. the naming standard is WRK/SRV + Year + Value of Month WRK 2013 09. The names are automatically generated using the actual month. You save time by automating the process. You eliminate errors by automating the process. All deployments are created as disabled deployments. This gives you complete control over the [...]

By |2013-09-20T13:45:06+01:00september 20th, 2013|Configuration Manager (SCCM)|30 Comments

How to edit default Resolution States

  Resolution States is an area in SCOM that is highly underestimated in my eyes. These can really be used to a lot – scoping, viewing, alerting, subscriptions etc. I do see a lot using it, and those who do have seen the light in this magnificent “tool”.   However, with SCOM 2012 Microsoft has added some default Resolution States:     The Acknowledged state is fairly useful, but the rest… I don’t really know. But these are all predefined, so we can’t delete them. But we can actually!   To edit these it requires manually changes to the database, [...]

By |2013-09-17T16:32:34+01:00september 17th, 2013|Operations Manager (SCOM)|Kommentarer lukket til How to edit default Resolution States

Exchange 2010 MP – be aware of events!

  I admit it, the Exchange 2010 has been fairly improved comparing to its younger sibling, the Exchange 2003 mp. We still have a load of Rules and Monitors, it’s still noisy and we still have to run all the Test-Something.ps1 scripts. There i one thing that one should be aware of though. The mp generates a LOT of events. I was at a costumer site last week configuring the mp, and i got this: 45202 events! In 10 days! The events are pretty usefull when testing the Test-Something scripts, as they run with 5 min. interval, you will get [...]

By |2013-09-16T13:41:09+01:00september 16th, 2013|Operations Manager (SCOM)|Kommentarer lukket til Exchange 2010 MP – be aware of events!