Thursday, March 20, 2014

How to Move databases for SCCM 2012


Microsoft SQL Server reported SQL message 50000, severity 16: *** Unknown SQL Error!
or

How to Move databases for SCCM 2012


How to Move databases for SCCM 2012

1.       On SCCM Site Server
a.       Stop site server using  (Configuration Manager site installation folder)\bin\X64\00000409\preinst.exe /STOPSITE
2.       On Reporting Server
a.       Backup the encryption key using Reporting Services Config tool
b.      Stop the Report Server service using the Reporting Services Config tool
3.       On Wsus server
a.       Stop IIS Admin Service
b.      Stop Update Services Service
4.       On SQL Server for WSUS DB
a.       Detach SUSDB – single user rollback immediate
b.      Move both files (mdf and ldf)
c.       Attach SUSDB to new SQL server
d.      Verify Wsus server machine account  has login permissions and is member of webService Role
5.       On SQL Server for Reporting Services DB
a.       Detach SCCM_ReportServer
b.      Detach SCCM_ReportServerTempDB
c.       Move all 4 files (2 mdf and 2 ldf)
d.      Attach both databases
e.      Verify that RSExecRole is a database role on both SCCM_ReportServer and SCCM_ReportServerTempDB.
                                                               i.      If not, create role perhttp://msdn.microsoft.com/en-us/library/cc281308.aspx
6.       On SQL Server for SCCM DB
a.       Detach CM_(Site Code)
b.      Move both files (mdf and ldf)
c.       Attach CM_(Site Code) to new SQL Server run the following stored procedure as a query: sp_configure ‘clr enabled’,1; reconfigure.
d.      Enable common language runtime (CLR) integration
e.      Verify SCCM Site servers are Local Administrators on the SQL server
f.        Add the site server system account as login account with admin rights to SQL
7.       On Wsus server
a.       Edit Backend Database registry key to point to new name/instance
                                                               i.     HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlServerName. In the Value text box, type [BEName]\[InstanceName], and then click OK. If the instance name is the default instance, type [BEName].
                                                             ii.     HKEY_LOCAL_MACHINE\Software\Microsoft\Update Services\Server\Setup\wYukonInstalled. In the Value text box, type 0, and then click OK. This indicates that Windows Internal Database is not used.
                                                            iii.      Locate the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlInstanceIsRemote. In the Value text box, change the value to 1, and then click OK.
b.      Start IIS Admin Service
c.       Start Update Services Service
8.       On Report Server
a.       Open Reporting Services Config tool
b.      On Database page, select the new SQL server instance and click connect.
c.       Select the report server database and click apply
d.      On encryption key page click restore
e.      Setup the execution account
f.        Restart Report Server
9.       On SCCM Server
a.       Run Configuration Manager Setup Wizard using Setup.exe from  (Configuration Manager site installation folder)\BIN\X64\setup.exe.  Not from install media- you won't have the same options.
b.      Choose site maintenance or reset site
c.       Select Modify SQL Server configuration
d.      After wizard finishes restart SCCM site server
e.      In SCCM console update the properties of the Reporting Services Point role to use the SCCM Databse on the new server.  Administration>Servers and Site System Roles>Pick the server with the Reporting Services  Point Role>Pick Reporting services point>Right click and choose properties>Change Site Database Server name.

Monday, March 10, 2014

how to Get Dell servers Warranty Status using SCCM 2012 console

how to Get Dell servers Warranty Status using SCCM 2012 console:
The DWCET will extend the capabilities of the ConfigMgr 2012 console allowing you to easily get the warranty status of any system. I’ve written this tool in PowerShell and it has been tested on Windows Server 2012 with a ConfigMgr 2012 SP1 console installed. Running the setup file will do the following:
1. Create two new folders called:
3fd01cd1-9e01-461e-92cd-94866b8d1f39
ed9dee86-eadd-4ac8-82a1-7234a4646e62
in the following location:
%PROGRAMFILES(x86)%\Microsoft Configuration Manager\AdminConsole\XmlStorage\Extensions\Actions
2. Copy the DellWarranty.xml file to both of the newly created folders above
3.Finally, it will copy the Get-DellWarrantyGUI.ps1 and uninst.exe to the DWCETprogram folder.

Installing DWCET
Download DWCET 

Download the ZIP file from the link above, extrax the DWCET_setup.exe from the archive and run it. It will require administrative permissions to perform the installation.
55_1
When the installation is completed, you’ll have to relaunch all open ConfigMgr 2012consoles for this tool to work.
Using DWCET in your environment
In order to get the warranty status for a system, go to Assets and Compliance -> Overview -> Devices and select a device. You’ll now have two options to launch the tool, either from the context menu or from the ribbon menu. See the pictures below:
Context menu
55_4
Ribbon menu
55_3
1. Once you’ve launched the tool, a window will appear.
2. Click on Get Warranty and wait for a couple of seconds. The warranty status for the selected device will now be shown, see the picture below:
55_2
3. Click on Close.
If DWCET was not able to connect through WMI to the selected device, an error will be shown.


Sunday, March 2, 2014

Create XP collection

Create XP collection

WQl Query :
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation 5%"

Create Collection For Windows 64 and 86

Create Collection For Windows 64 and 86
WQL for Windows 64 :

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System   inner join   SMS_G_System_COMPUTER_SYSTEM   on   SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId   where   SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC"


WQL for Windows 86 :


select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System   inner join   SMS_G_System_COMPUTER_SYSTEM   on   SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId   where   SMS_G_System_COMPUTER_SYSTEM.SystemType = "x86-based PC"

create Collection For InActive Clients

Create Collection For InActive Clients
WQL :
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_CH_ClientSummary on SMS_G_System_CH_ClientSummary.ResourceID = SMS_R_System.ResourceId where SMS_G_System_CH_ClientSummary.ClientActiveStatus != 1

create Collection for Heartbeat ( Not Send By Last 60 Days )

create Collection for Heartbeat ( Not Send By Last 60 Days )
WQL :

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.ResourceId not in (select ResourceID from SMS_R_System where AgentName in ("Heartbeat Discovery") and DATEDIFF(day,AgentTime,GetDate())<=60)


Not : you can change 60 as you like

Create New collection For collect MCafee antivirus and Mcafee Site Advisor

Create New collection For collect MCafee antivirus and Mcafee Site Advisor

WQL Query for MCafee antivirus :
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SERVICE.Name = "mcshield"


WQL Query for Mcafee Site Advisor :
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SERVICE.Name = "McAfee SiteAdvisor Enterprise Service" and SMS_G_System_SYSTEM.SystemRole = "Workstation"