Monday, 26 September 2016

SCCM 2012 R2 Mandatory Hotfixes

SCCM 2012 R2 Mandatory Hotfixes


There are 2 hot-fixes which you should install as as oon as you install SCCM 2012 R2

KB2905002:

This Hotfix resolve the following 2 issues:

  1.  After you enable the PXE Service Point role on an instance of a specific distribution point, or you select the Deploy this boot image from the PXE-enabled distribution point property of a boot image, the Windows Deployment Service (WDS) stops running.
  2. When operating system image files are downloaded to Configuration Manager 2012 R2 clients, you may find that the download takes longer than it did in previous versions of Configuration Manager 2012 clients. You may see this behavior when the target client is running Windows PE or a full Windows operating system

KB2907591:

  1. Per-computer task sequence variables that are defined for imported computers are filtered out of client policies. This prevents the variables from being read during task sequence execution. This problem does not affect per-computer variables that are defined for existing clients. This update applies only to Primary sites.

SCCM 2012 R2 Discovery Methods

SCCM 2012 R2 Discovery Methods


To gather information regarding your resources in your company , configuration manager 2012 R2 makes use of methods called discovery methods. 
Configuration Manager 2012 R2 uses a variety of discovery methods to gather resource information and each of the discovery methods gathers information about different objects.

There are 6 types of of Discovery methods. they are:

  • Active Directory Forest Discovery
  • Active Directory Group Discovery
  • Active Directory System Discovery
  • Active Directory User Discovery
  • HeartBeat Discovery
  • Network Discovery


Active Directory Forest Discovery:

This discovers Active Directory sites and subnets, and then creates Configuration Manager boundaries for each site and subnet from the forests which have been configured for discovery. With this discovery method you are able to automatically create the Active Directory or IP subnet boundaries that are within the discovered Active Directory Forests.

Active Directory Group Discovery:

This discovers local, global, and universal security groups, the membership within these groups. When you configure the Group discovery you have the option to discover the membership of distribution groups. With the Active Directory Group Discovery you can also discover the computers that have logged in to the domain in a given period of time.

Active Directory System Discovery:


This discovers the computers in your organization from specified locations in Active Directory Domain Services then we use Active Directory System Discovery. In order to push the SCCM clients into the computers, the resources must be discovered first. There is an option to discover the computers that have logged on to a domain in given period of time

Active Directory User Discovery:

This discovers the user accounts from your Active Directory domain. You will have to specify the Active Directory container to search for the user accounts.


HeartBeat Discovery:

This discovery runs on every Configuration Manager client and is used by Active Configuration Manager clients to update their discovery records in the database.

Network Discovery:

This discovery searches your network infrastructure for network devices that have an IP address. It can search the domains, SNMP devices and DHCP servers to find the resources. 

Thursday, 15 September 2016

Set-DnsClientServerAddress: Powershell command to set the DNS Server

Set-DnsClientServerAddress: Powershell command to set the DNS Server


  • You need to configure the DNS Server Ip adress of the Server.
  • This will help name resolution to happen correctly.
  • To configure DNS Server Name for your network Card use "Set-DnsClientServerAddress"

Set-DnsClientServerAddress -InterfaceAlias "AdminNet" -ServerAddresses 192.168.10.2

PowerShell command to set Ipv6 IP Address


PowerShell command to step Ipv6 IP Address

  • Powershell is the most effective way to set the Ip Adress to all servers.
  • You use the New-NetIPAddress with -AddressFamily IPv6
  • This will set the Ipaddress to V6.
  • You should also mention the interface address

New-NetIPAddress -AddressFamily IPv6 -InterfaceAlias "AdminNet" `
-IPAddress 2001:db8:0:10::2 -PrefixLength 64 -DefaultGateway 2001:db8:0:10::1

New-NetIPAddress: PowerShell command to configure Static Ip Address

PowerShell command to configure Static Ip Address

  • Many times we have to configure Ipadress
  • Its usually done for servers where static ip address are given.
  • To set Static Ip adress you need to know the Network Interface for which you want to set the IP
  • To configure you use the command "New-NetIPAddress"
New-NetIPAddress -AddressFamily IPv4 -InterfaceAlias "AdminNet" `
-IPAddress 192.168.10.2 -PrefixLength 24 -DefaultGateway 192.168.10.1

  • -AddressFamily tells whether its IPV4 or IPV6
  • -InterfaceAlias tells the Name of the network.
  • -IPAddress specify the ip adress you want to configure.
  • -PrefixLength speciy the Subnet length.
  • -DefaultGateway specify the Gateway IP.

PowerShell Commmand to Disable DHCP on the Network Interface

PowerShell Commmand to Disable DHCP on the Network Interface

  • In Server we generally dont use DHCP to assign IP address.
  • We usuall set Static IP Address to Server.
  • So we need to disable the DHCP.
  • To disable DHCP from Powershell use the Command "Set-NetIPInterface" with option -DHCP Disabled

Set-NetIPInterface -InterfaceAlias "Admin" -DHCP Disabled -PassThru

  • You should specifyf or which interface you want to disable the DHCP, So you have to give the InterfaceAlias as well.

Get-NetAdapter: PowerShell Command to find Network Adapater Alias name and Index Number

PowerShell Command to find Network Adapater Alias name and Index Number


  • If you have to do changes to your Network Adapter then you need to know the Alias Name and Index Number
  • You can find those easily in PowerShell
  • The Command is "Get-NetAdapter"
  • You can see the "Name" which is Alias and ifIndex which is the "Index Number"

Wednesday, 14 September 2016

Install-ADDSDomainController: PowerShell Command to Promote a Server to Domain Controller

PowerShell Command to Promote a Server to Domain Controller




Install-ADDSDomainController -SkipPreChecks -NoGlobalCatalog:$false -CreateDnsDelegation:$false `
-CriticalReplicationOnly:$false -DatabasePath "C:\Windows\NTDS" -DomainName "Contoso.com" `
-InstallDns:$true -LogPath "C:\Windows\NTDS" NoRebootOnCompletion:$false -SiteName `
"Default-First-Site-Name" `-SysvolPath "C:\Windows\SYSVOL" -Force:$true


  • Install-ADDSDomainController will promote the Server to Domain Controller.
  • -SkipPreChecks will skip the prechecks and will procced with the install
  •  -NoGlobalCatalog:$false Will not install Global Catalog Component on this server.
  • -CreateDnsDelegation:$false Will not create DNS Delegation on this server
  • -DatabasePath tell where should be the NTDS Folder Location
  • -DomainName tell your Domain Name
  • -InstallDns:$true Installs DNS Component on the server
  • -LogPath tells the LogPath Location.
  •  NoRebootOnCompletion:$false Will not reboot the server after install.If you want to reboot make it $true
  • -SiteName Enter the AD Site name where server has to be installed
  • -SysvolPath Location of the Sysvol folder

Saturday, 10 September 2016

Run Pre Scan to Avoid Windows 10 Upgrade Failures with SCCM 2012 R2

Avoid Windows 10 Upgrade Failures with SCCM 2012 R2

  • Windows 10 Upgrade is the most done work by SCCM today.
  • All most all organizations wants to upgrade from Window 7 to Windows 10.
  • But there comes the challenge the amount of failures with inplace upgrade is huge.
  • This is because of various reason.
  • One thing that all SCCM admin who are planning to upgrade should do is to run a Compatibility Check before doing the actual upgrade
  • What it does is SCAN the PC which is going to be upgraded and check for any conflicts or failures that are predicted during the upgrade.
  • This test helps you identify the failures before the upgrade and can avoid customer frustration.
  • The Command to Run this test is
SETUP.EXE /Auto Upgrade /Quiet /NoReboot /DynamicUpdate Disable /Compat ScanOnly

  • Happy upgrading

Windows 10 Upgrade Failed with Error code 0x80200056 while deploying from SCCM 2012 R2

Windows 10 Upgrade Failed with Error code 0x80200056 while deploying from SCCM 2012 R2


  • Windows 10 Upgrade Pushed from SCCM can fail because of various reasons.
  • You need to read the error code and understand it to further troubleshoot.
  • One of the frequest errors i see while upgrade is Error code "0x80200056"
  • This error means that there was some interuption while u upgrade the OS.
  • Reason couble be user has switched off the Laptop,Or it got restarted because of some power issues, or Network got disconnected.
  • To fix this instruct the user not to turn off or disconnect the PC from network till the upgrade is compelete.This should resolve the issue

Windows 10 Upgrade failed with error 0x80073712 while deploying from SCCM 2012 R2

Windows 10 Upgrade failed with error 0x80073712 while deploying from SCCM 2012 R2


  • Windows 10 Upgrade is giving lot of issues.
  • There are also lot of complains. One error i see while Deployement fails is with error code "0x80073712"
  • This error indicates that there is issue with the file which is needed is damaged or missing.
  • Mostly your ISO that you created is missing some files or is damaged.
  • So make a fresh copy of ISO from Install media and try again
  • This time it succeded without any errors.

Troubleshooting OS Deployement errors during SCCM 2012 R2 Push Install

Troubleshooting OS Deployement errors during SCCM 2012 R2 Push Install


  • SCCM is the widely used tool for OS deployement.
  • The reason being very effective Step by Step Install Task equence which give great flexibitly to Administrator to deploy consistent image in the organization.
  • So one of the frequest issues i face is that the OS deploy fails in the middle even if ts standarize image.
  • So to troubleshoot OS deployment errors you need to look for errors in SMSTS.log
  • This task will show in which Task Sequence it got failed.
  • It will also give you the error code which you can then google to get more information.
  • So while the OS is deployed connect to the server where it is deployed and Press F8
  • Then type CMDTRACE command. This will open the Log viewer
  • The location of SMSTS.log is "\WINDOWS\TEMP\SMSTSlog"
  • Open the logfile in CMDTRACE and check for errors.

Content not Downloading to Distribution Point in SCCM 2012 R2

Content not Downloading to Distribution Point in SCCM 2012 R2


  • SCCM is a very complex system.
  • It hard to troubleshoot even with such exhaustive logging
  • Reason is that the Mutiple issues on system can cause a side effect 
  • So one of the frequent issue i face in my envionment is that the Content is not avaialble in Distribution Point.
  • To resolve this the only effective solution i found is to reboot the server.
  • So dont waste time investigating logs, as it will give 1000 varities of error
  • As first step reboot the Distribution point server. 
  • If you still have issues then you can troubleshoot with logs

Wednesday, 7 September 2016

How to restore a Corrupt SCOM Database in SCOM 2012 R2 Step by Step

How to restore a Corrupt SCOM Database in SCOM 2012 R2

  • Sometimes the SCOM database gets corrupted because of disk issue.
  • Restoring it from Backup is a very lengthy process and time consuming.
  • Opening a ticket with Microsoft might help, but there default reply is to restore from last good backup
  • So how you quickly recovery a corrupt SCOM database?. There is a way.
  • First Stop all SCOM Services on your management server.
  • Then Put the Corrupt SCOM database in SINGLE_USER Mode.
If you Operations Manager DB is corrupted Run the below command,

DBCC CHECKDB ('OperationManager', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS, NO_INFOMSGS
    If you Operations Manager Datawhare house is corrupted Run the below command,

    DBCC CHECKDB ('OperationsManagerDW', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS, NO_INFOMSGS

    • Once completed you should be able to bring your database online

    Step by Step Procedure to Restore SCOM 2012 R2 Databases after crash or Disaster:

    Step by Step Procedure to Restore SCOM 2012 R2 Databases after crash or Disaster:


    Many times for various reason we have to restore the SCOM databases.Follow the below procedure

    • Start SQL Server Management Studio.
    • In the Connect to Server dialog box, select the appropriate values in the Server type drop-down combo box, in the Server name box, and in the Authentication box.
    • Click Connect.
    • In Object Explorer, expand Databases, and then select the OperationsManager, OperationsManagerAC, or OperationsManagerDW database.
    • Right-click the database, point to Tasks, and then click Restore.
    • Click Database to open the Restore Database dialog box.
    • On the General page, the name of the restoring database appears in the To database list.
    • In the To a point in time text box, either retain the default (the most recent possible) or select a specific date and time by clicking the browse button, which opens the Point in Time Restore dialog box.
    • To specify the source and location of the backup sets to restore, click the From Device option.
    • Click Browse to open the Specify Backup dialog box.
    • In the Backup media list box, select one of the listed device types. To select one or more devices for the Backup location list box, click Add.
    • In the Select the backup sets to restore grid, select the backups to restore. This grid displays the backups available for the specified location.
    • In the Restore options panel, select the Overwrite the existing database option.
    • In the Restore the database files as options panel, verify the original database file name and path are correct.
    • For the Recovery state options, specify the state option Leave the databases ready to use by rolling back the uncommitted transactions
    • Additional transaction logs cannot be restored.
    • Click OK to restore the database.
    • Make sure whenever you restore always restore OperationsManager, and OperationsManagerDW database. Orelse youw ill face 31552 issue.

    SCOM 2012 R2 UR11 upgrade step by step


    SCOM 2012 R2 UR11 upgrade step by step


    • Microsoft released Update(update Roleup) every now and then. They generally do lot of bug fixes in these update.Today Microsoft has released SCOM UR11 Upgrade. Lets go Step by Step in this upgrade.
    • First Download the UR11 from below Site.


    http://catalog.update.microsoft.com/v7/site/Search.aspx?q=3183990



    Step1: Upgrading the Management Server:


    • Extract the Files that you downloaded to C:\Bin\UR11 folder.
    • Login using the SCOM service account or account which has local admin,SCOM admin and SA Admin on SCOM database.Usually your SCOM service account will have these acc. So i suggest to use it.

    • Now Open Command Prompt in elevated mode and Go to "C:\Bin\UR11" folder
    • Type "KB3183990-AMD64-Server.msp"
    • This will launch Update.You will be prompted to restart your system after the update.Click yes and system will restart
    • Once its up check the Application log for Event ID 1036. Make sure it successful.
    • Also make sure File Version are 7.1.10226.1239 in your Management Server.
    • You Should upgrade your additional management server in same way before proceeding to next step.
    Step2:Upgrade SCOM Webconsole and SCOM Console:

    • Now Open Command Prompt in elevated mode and Go to "C:\Bin\UR11" folder
    • Type "KB3183990-AMD64-ENU-WebConsole.msp"
    • This will update the Web console.
    • Next Type "KB3183990-AMD64-ENU-Console.msp"
    •  This will update the Console.
    Step3:Updating the Gateway Servers:

    • Login to your Gateway server. Copy the Downloaded file  TO "C:\Bin\UR11" Folder
    • Now Open Command Prompt in elevated mode and Go to "C:\Bin\UR11" folder
    • Type "KB3183990-AMD64-Gateway.msp"
    • This will update the Gateway Server
    Step4:Update the SCOM Databases:

    • First Make sure you have stopped all SCOM services on your Management server and restart the SQL Server service once
    • Login to the SCOM Database Server
    • Open a SQL management studio query window, connect it to your Operations Manager database.
    • Now go to the upgrade Management server at below location %SystemDrive%\Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\SQL Script for Update Rollups
    • Copy the SQL Scripts "update_rollup_mom_db.sql" and execute in the Query windows. This script could faill but continue trying till it succeeds
    • Try re-running the script several times until it completes without errors.  In a production environment, you have to shut down the services (sdk, config, and healthservice) on your management servers, to break their connection to the databases, to get a successful run. 
    • Once OperationsManager DB is update close the Query window.
    • Now open a SQL management studio query window, connect it to your OperationsManagerDW database.
    • Copy the SQL Scripts "UR_Datawarehouse.sql" and execute in the Query windows. This script could fail but continue trying till it succeeds.
    Note: Dont Proceed to Next step till it succeeds

    Step5:Import the management packs:
    • The path for these is on your management server, after you have installed the “Server” update: \Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\Management Packs for Update Rollups
    • You can install the MP.
    Step5:Updating the Agents:

    • Login to SCOM Management server
    • Open SCOM Console==>Administration Tab
    • Click on "Pending Management".Select all the agent you see and Click "Approve".

    SCCM 1608 Technical Preview released

    SCCM 1608 Technical Preview released


    You can Download it here



    Some Key Features added are


    Software Center Changes – There has been some great improvements in Software Center. When an user requests for an application, the application request history can be now seen in Application Details view in Software Center. If the user clicks on request button, it would not redirect to the Application Catalog.

    Asset Intelligence Changes– In this preview, you can find a new field added to the properties for inventoried software. This will lets you set a parent and child relationship with other software. You can now view the parent of any software and also hide all child software. Once you define parent to child relationships, you can filter your view to only show software that is a parent or that has no defined relationship.

    Remote Control Keyboard Translation Issues Resolved – When an admin takes a remote control of user’s computer, there would be problem if the keyboard configurations were different at each end. This issue has been resolved now. What ever key the viewer types in, the same key arrives at sharer end.

    Changes in Prepare ConfigMgr Client for Capture task sequence step – starting with this preview, instead of removing key information, the configuration manager client will be removed. So when you deploy a captured OS, the configuration manager client is installed freshly.

    Monday, 5 September 2016

    What is Azure resource group and how to create it PowerShell

    What is Azure resource group and how to create it PowerShell

    What is Resource group:

    • Before deploying any resources to your subscription, you must create a resource group that will contain the resources.

    Create a resource group:

    • To create a resource group, use the New-AzureRmResourceGroup cmdlet.

    New-AzureRmResourceGroup -Name CognosApp -Location "West US"

    • Uses the Name parameter to specify a name for the resource group and the Location parameter to specify its location.

    Connect to Specific Azure Subscription using Powershell

    Connect to Specific Azure Subscription using Powershell


    • Organizations have mutiple Subscriptions, One for DEV,One for ACC and One for PROD.
    • So there are times where you want to connect to particular Subscription.
    • You have to use the command Set-AzureRmContext with SubscriptionID followed by the unique Subscription ID for the Subscription

    Set-AzureRmContext -SubscriptionID <YourSubscriptionId>

    How to Login to your Azure from PowerShell

    How to Login to your Azure from PowerShell

    • To login to your Azure account, use the Add-AzureRmAccount cmdlet.

    Add-AzureRmAccount

    • The cmdlet prompts you for the login credentials for your Azure account. 
    • After logging in, it downloads your account settings so they are available to Azure PowerShell.
    • The account settings expire, so you need to refresh them occasionally. 
    • To refresh the account settings, run Add-AzureRmAccount again.

    Azure PowerShell Step By Step Tutorial

    Azure PowerShell Step By Step Tutorial


    What is Azure PowerShell:

    • Azure PowerShell is a set of modules that provide cmdlets to manage Azure with Windows PowerShell. 
    • You can use the cmdlets to create, test, deploy, and manage solutions and services delivered through the Azure platform. 
    • The cmdlets can be used for the same tasks as the Azure Management Portal, such as creating and configuring cloud services, virtual machines, virtual networks, and web apps.
    How to Install Azure PowerShell on your Computer:



    There are 2 Ways you can install Azure PowerShell

    First Type:
    Second Type:

    • Open PowerShell in Eleveated Prompt as Admin

    Install-Module AzureRM

    • Above Command Install the Azure Resource Manager modules from the PowerShell Gallery
    Install-Module Azure

    • Install the Azure Service Management module from the PowerShell Gallery