DHCP Guide

This document describes common scenarios for implementing DHCP in relation to PXE boot with particular focus on Configuration Manager. Assumptions and audience Audience must familiar with basic IP networking principles. The background In order for a client to perform a PXE boot, there must be a DHCP service available, this is not required to be a Microsoft DHCP service. Any DHCP server is good. The following diagram shows a typical network setup In this case the client and the server is on the same network, which is the simplest setup you will come across, normally the setup will be more [...]

December 11: Microsoft Enterprise Mobility Suite (EMS) Resources at your fingertips

I know it's a pompous title, but that still the idea behind what I want to show next. As an IT-Pro I am used to staying up to date on the latest technology that I am working with. And with On-premises solutions like traditional ConfigMgr implementations, staying up to date is not too hard with a little bit of effort since new features and updates are not added daily as opposed to what is going on in the Cloud. Now for some time now I have been working with Cloud services like Microsoft Intune and eventually EMS after the suite [...]

Troubleshooting: An error occurred when creating the WSUS Signing Certificate (Secunia)

Lately I have been doing some Secunia integrations with System Center 2012 R2: Configuration Manager (SCCM/ConfigMgr 2012). When you are setting up the connector between Secunia CSI and WSUS one of the first things the wizard is asking you to do is to Configure a WSUS Self-Signed Certificate, the WSUS signing certificate is required to create and install local packages. Without it, only packages from Microsoft Update will be installed. How-ever this time I got this error when trying to 'Automatically create and install certificate'  during the Connector Wizard: An error occurred when creating the WSUS Signing Certificate Now this [...]

By |2015-10-20T20:14:46+01:00oktober 20th, 2015|Configuration Manager (SCCM), Security|1 Kommentar

How to: Create custom SQL- based Reports in System Center 2012 R2: Configuration Manager

A customer asked me  for a “how-to” on how to Create reports in SCCM 2012, so why not share with everyone. This post is not intended to show how to write or design queries, but show you have to create  a report based on a SQL query you might already have. Even-though we are skipping how to write SQL Queries for know, this post is still going to be a bit long. Time for that cup of coffee! First some requirements: You need to have an SQL Server instance for SCCM with SQL Reporting Services running You need to have [...]

Upgrade System Center Configuration Manager Console with PowerShell

Since Service Pack 1 was released to SCCM 2012 R2 I have been upgraded several environments. A couple of customers wanted me to create a PowerShell script to uninstall existing ConfigMgr Console and install the new updated version with the latest cumulative updates and hotfixes. If you create a package to distribute it with SCCM make sure you point the Data source to the location of the Client installations files, Script, KB3084586-msp and kb3074857-msp. Installation command for the program will then be: PowerShell.exe -file "script.ps1". Remember to set PowerShell execution policy to "Bypass" under Client Settings. This will not affect [...]

By |2015-09-17T18:14:33+01:00september 17th, 2015|Configuration Manager (SCCM), General info, Powershell, Scripting & Development|Kommentarer lukket til Upgrade System Center Configuration Manager Console with PowerShell

Beyond unsupported – How to add PowerShell ISE to ConfigMgr Admin Console

As you already know, then currently we can only start PowerShell Console through Configuration Manager Admin Console but most likely  you may want to start PowerShell ISE through Admin Console :) Step-by-step guide First, this is not supported so don’t blame me if something is not working. Please also remember that there is no SAVE button in Admin Console Builder Tool! Close ConfigMgr Admin Console Start AdminUI.ConsoleBuilder.exe – You can find this tool under the Admin Console installation folder   Select File –> Open –> ConnectedConsole Select View->Application Menu Items Select Connect via Windows PowerShell and right-click select Clone Now [...]

New ConfigMgr PowerShell cmdlets in CU4

Microsoft just released a new CU for Configuration Manager and with latest CU we got 35 PowerShell cmdlets. Now we have 597 PowerShell cmdlets. Here are the new ones: Add-CMDeploymentTypeDependency Add-CMDeploymentTypeSupersedence ConvertFrom-CMApplication ConvertFrom-CMConfigurationItem ConvertTo-CMApplication ConvertTo-CMConfigurationItem Get-CMCertificate Get-CMClientOperation Get-CMDeploymentTypeDependency Get-CMDeploymentTypeDependencyGroup Get-CMDeploymentTypeSupersedence Get-CMMigrationSource Get-CMObjectSecurityScope Get-CMQuery Get-CMSiteRole Invoke-CMGroupDiscovery Invoke-CMQuery Invoke-CMSystemDiscovery Invoke-CMUserDiscovery New-CMADGroupDiscoveryScope New-CMDeploymentTypeDependencyGroup New-CMEmbeddedObjectInstance New-CMEmbeddedProperty New-CMEmbeddedPropertyList New-CMQuery Remove-CMCollection Remove-CMDeploymentTypeDependency Remove-CMDeploymentTypeDependencyGroup Remove-CMDeploymentTypeSupersedence Remove-CMQuery Set-CMDeploymentTypeDependency Set-CMDeploymentTypeDependencyGroup Set-CMDeploymentTypeSupersedence Set-CMQuery Sync-CMMigrationSource   Happy Scripting! :)

Create ConfigMgr Collections and Admin Console Folders with PowerShell

Starting from ConfigMgr 2012 R2 we can use New-Item PowerShell cmdlet to create ConfigMgr Admin Console folders. Here is one simple and quick PowerShell script that allows you to create folders and Collections and finally it moves the Collection to correct folder. #Step 1 Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") $SiteCode = Get-PSDrive -PSProvider CMSITE Set-Location "$($SiteCode.Name):\" #Step 2 New-Item -Name 'OSD' -Path 'PS1:\DeviceCollection' New-Item -Name 'Mobile Device Management' -Path 'PS1:\DeviceCollection' New-Item -Name 'Power Management' -Path 'PS1:\DeviceCollection' New-Item -Name 'ViaMonstra' -Path 'PS1:\DeviceCollection' New-Item -Name 'Software Updates' -Path 'PS1:\DeviceCollection' New-Item -Name 'Compliance' -Path 'PS1:\DeviceCollection' #Step 3 New-CMDeviceCollection -Name 'Test 1' -LimitingCollectionName 'All Systems' New-CMDeviceCollection -Name [...]

Change device ownership in Configuration Manager with PowerShell

All newly enrolled devices are enrolled as Personal Devices by default in Configuration Manager and we cant change the default behavior. If the Device Ownership is Company, then we can inventory all the installed applications and we can also do mandatory installations. If the Device Ownership is Personal, then we can inventory only applications that are installed through Company Portal. If your company policy is that all the devices must be company-owned, then you can use this script to query a specific collection devices and it will set the Device Ownership to Company. Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") $SiteCode = Get-PSDrive -PSProvider CMSITE [...]

Device based vs User based MDM policies in ConfigMgr 2012 R2

With ConfigMgr and Intune you have long been able to manage devices like Android, iOS and Windows with mail profiles, security settings, Wi-Fi profiles and VPN profiles. Deployment of those profiles has undergone a fundamental change with the release of ConfigMgr R2 and CU3. To understand those changes you first to understand how policies were deployed in the past. Back in the old days “prior to R2 CU3” On the ConfigMgr side, even if you deployed policies to a user it would always be deployed to the device. What happened in the background the policy generated would not be generated [...]

By |2014-11-26T15:02:42+01:00november 26th, 2014|Configuration Manager (SCCM)|1 Kommentar

Configuration Manager 2012 SP1 and R2 PowerShell Provider

Updated 23.03.2015! As you might have already noticed that Configuration Manager PowerShell Provider is lot like Active Directory, Registry etc. provider. To run a cmdlet you need to be inside CMSITE. If you are still using SP1+, then: 1. you can´t use New-Item cmdlet to create folders 2. you can´t set the location to sub folders 3. Get-ChildItem does not work at all If you are using R2+, then 1. You can use New-Item to create folders 2. You can change the location i.e. sub folders etc. 3. Get-ChildItem only prints out folder objects but not collections, applications etc. inside [...]

By |2014-09-30T10:13:45+01:00september 30th, 2014|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Configuration Manager 2012 SP1 and R2 PowerShell Provider

Scripts and links from my sessions @IT/Dev connections

A big thanks to all who attended at our sessions. Below are the links to the scripts and blog post we referenced during the session. Hope to see you all again next year! Managing Configuration Manager with PowerShell [download id="217"] Building Custom Tools Using PowerShell [download id="216"] Truly Better Together: Configuration Manager 2012 R2 and PowerShell [download id="215"] Quick and Dirty – Build Configuration Manager 2012 Admin Console Extensions automatically - http://cm12sdk.net/?p=2299 Configuration Manager 2012 R2 Developer Excel Sheet - http://cm12sdk.net/?p=2326 Does Your Hard Work Advance the Ecosystem? - http://blogs.msdn.com/b/powershell/archive/2011/02/07/does-your-hard-work-advance-the-ecosystem.aspx Coretech Collections Tool - https://blog.ctglobalservices.com/kaj/coretech-configuration-manager-2012-r2-powershell-automation-module-0-1/ Before you start using these script examples on your production environment, please make [...]

By |2014-09-21T20:10:39+01:00september 21st, 2014|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Scripts and links from my sessions @IT/Dev connections

Coretech Configuration Manager 2012 R2 PowerShell automation module 0.1

During the TechEd Kent showed one of our solution that allows you to save all the Collections to an Excel file or to create Collections based on Excel template. We have received a lot of emails and twitter tweets that when we are going to publish it and good news is that we will publish it now :) . If you haven't seen the Kent TechEd video, then I recommend to watch it before you use this module. This is not the latest version and it is work in progress release. We will continue to improve this PowerShell module. Here [...]

Working with Security Scopes in Configuration Manager with PowerShell

Last year @MMS Kent showed our automated RBA solution and I just discovered that this does not work in ConfigMgr 2012 R2 CU1 environment. It seems like they have changed the process behind the UI and in ConfigMgr 2012 R2 CU1 environment they are using different IDs to identify the Object. Before they used FolderTypeID value but now they are using SecuredTypeID values. You will need these values, if you are working with SMS_SecuredCategoryMemberShip WMI class and AddMemberShips/RemoveMemberships mehtods FolderTypeID FolderTypeName SecuredTypeID 2 SMS_Package 2 7 SMS_Query 7 9 SMS_MeteredProductRule 9 11 SMS_ConfigurationItem 11 14 SMS_OperatingSystemInstallPackage 14 16 SMS_VhdPackage 16 [...]

How to change Configuration Manager Hardware Inventory Schedule Client Setting

Today I tried to modify Hardware Inventory Schedule client setting and it didn't work. First I thought that I did something wrong or the cmdlet is broken. Here is the cmdlet Verbose output Then I thought that, lets disable the HW client setting and then enable the HW client setting with correct schedule and Bingo it worked correctly. #Step 1 $ClientSettingsName = 'HW Settings' Set-CMClientSetting -Name $ClientSettingsName -EnableHardwareInventory $false -Verbose -Debug #Step 2 $CMWeeklySchedule = New-CMSchedule -RecurCount 1 -RecurInterval Hours Set-CMClientSetting -InventorySchedule $CMWeeklySchedule -Name $ClientSettingsName -EnableHardwareInventory $True -Verbose -Debug If you compare the verbose outputs, then you will see the [...]

Export out User Device Affinity Relationship with PowerShell

This script allows to export out specific collection UDA Relationships to a CSV file. Here is the script it self. Run it on your Primary Site Server and then open the CSV file with Excel. <# .Synopsis This script exports out specific collection UDA Relationships .DESCRIPTION .EXAMPLE Export-CMUDARelationships.ps1 -DeviceCollectionName "All Systems" -OutPut C:\Scripts\Reports\UDA.csv -SiteCode PS1 .NOTES Developed by Kaido Järvemets, Coretech A/S Version 1.0 #> Param( [Parameter(Mandatory=$True,HelpMessage="Please Enter ConfigMgr Collection Name",ParameterSetName='CSV')] $DeviceCollectionName, [Parameter(Mandatory=$True,HelpMessage="Please Enter CSV file location",ParameterSetName='CSV')] $OutPut, [Parameter(Mandatory=$True,HelpMessage="Please Enter ConfigMgr site code",ParameterSetName='CSV')] $SiteCode ) $CollectionQuery = Get-CimInstance -Namespace "Root\SMS\Site_$SiteCode" -ClassName "SMS_Collection" -Filter "Name='$DeviceCollectionName' and CollectionType='2'" $ResourcesInCollection = Get-CimInstance -Namespace [...]

The EASY WAY – List objects in specific folder in Configuration Manager 2012 with PowerShell

Last week I saw one blog post how to list specific folder objects and I believe that actually there is much easier way to list the objects in specific folder. First we need to figure out the ContainerNodeID which is the folder unique ID. We have several ways to find out the folder unique ID, for example we can run the ConfigMgr Admin console in developer mode or we can use a WMI tool. There are different WMI tools that you can find from the internet or you can simple use the WBEMTEST tool also which is already built-in in [...]

How to move objects in Configuration Manager Admin Console with PowerShell

Starting with Configuration Manager 2012 R2 we have a cmdlet called Move-CMObject. This cmdlet allows to move different objects in Admin Console. We still don't have a cmdlet that allows to create ConfigMgr Admin Console folders but if necessary you can use this code to create folders. Here are 6 different examples How to move objects in ConfigMgr Admin Console # Example 1 $CMCollection = Get-CMDeviceCollection -Name "OSD - Windows 8.1" Move-CMObject -FolderPath "PS1:\DeviceCollection\OSD" -InputObject $CMCollection # Example 2 $CollectionID = "PS10036C" Move-CMObject -FolderPath "PS1:\DeviceCollection\OSD" -ObjectId $CollectionID # Example 3 $ConfigurationItem = Get-CMConfigurationItem -Name "Business Hours" Move-CMObject -FolderPath "PS1:\ConfigurationItem\LOB" -InputObject [...]

Create ConfigMgr 2012 R2 Collections with Powershell

I know we have migrations tools and other built-in options when we want to build a new ConfigMgr environment. But Microsoft have given us Powershell, and there are some really cool cmdlets that we can utilize. I’ve had a couple of examples lately where i had to create 100+ collections from scratch – or basicly from just a list of applications… And instead of doing that by hand i would much rather do it with Powershell, and save my poor fingers alot of clicking and typing. Microsoft have a Technet site where all ConfigMgr 2012 R2 cmdlets are listed and [...]

By |2014-02-18T14:07:36+01:00februar 18th, 2014|Configuration Manager (SCCM), Powershell|6 Comments

Coretech HTA

The main idea with this HTA is to assist small and medium sized organizations with an easy way to implement a custom OSD solution without having any developer or HTML skills. The HTA solutions can be used when booting directly into WinPE and to prestage computers. Why; You might ask, Why, do Coretech create this tool instead of using the built-in tools in Configuration Manager or using the UDI wizard in Microsoft Deployment Toolkit?  The answer is straight forward. We often run into customers who do not have the knowledge it takes to build custom solutions or use the UDI [...]

How to add Configuration Manager Distribution Point Remotely with PowerShell

If you are trying to add a Configuration Manager Distribution Point remotely you may end up with issue: WARNING: The self-signed certificate could not be created successfully Validation of input parameters failed. Cannot Continue Code example Invoke-Command -ScriptBlock { #Step 1 Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") #Step 2 $SiteCode = Get-PSDrive -PSProvider CMSITE #Step 3 Set-Location "$($SiteCode.Name):\" #Step 4 Add-CMDistributionPoint -SiteSystemServerName TestServer.corp.viamonstra.com -SiteCode $SiteCode.Name ` -ClientConnectionType Intranet -MinimumFreeSpaceMB 50 -PrimaryContentLibraryLocation Automatic ` -SecondaryContentLibraryLocation Automatic -PrimaryPackageShareLocation Automatic -EnablePxeSupport ` -SecondaryPackageShareLocation Automatic -CertificateExpirationTimeUtc ((Get-Date).AddYears(100)) -ErrorAction STOP } -ComputerName CM01.corp.viamonstra.com If you take same code and run it locally on your Primary Site Server, then it [...]

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

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 [...]