Tuesday, April 26, 2016

SCCM 2012 SQL Views

SCCM 2012 SQL Views

To get SCCM 2012 SQL views , please try below query. I think, this is handy particularly when you upgrade SCCM infrastructure and new reports are added to the release.

SELECT DISTINCT TOP (100) PERCENT TABLE_NAME, COLUMN_NAME
FROM            INFORMATION_SCHEMA.COLUMNS
WHERE        (TABLE_NAME LIKE 'v_%')
ORDER BY TABLE_NAME

Run the report, save in excel and use pivot for ease of use.

Thanks

Tuesday, February 9, 2016

SCCM 2012 Client Push Properties

SCCM 2012 Client Push Properties


SMSSITECODE=abc SMSCACHESIZE=15000(in MB) SMSMP=SCCM1.abc.com FSP=SCCM2.abc.com


More Details here
https://technet.microsoft.com/en-us/library/gg699356.aspx

Tuesday, October 27, 2015

Installing Multiple Software Updates(.msu) with SCCM using AutoIT Script


Installing Multiple Software Updates(.msu) with SCCM using AutoIT Script

Used below sample AutoIT script for installing Microsoft updates @ SCCM. Created an application, deployment type as script.

//
Opt("TrayIconHide", 1)
ShellExecuteWait("wusa.exe", "/quiet /norestart Windows6.1-KB3083710-x86.msu", "", "", @SW_HIDE)
ShellExecuteWait("wusa.exe", "/quiet /norestart Windows6.1-KB3088195-x86.msu-MS15-111.msu", "", "", @SW_HIDE)
ShellExecuteWait("wusa.exe", "/quiet /norestart IE11-Windows6.1-KB3093983-x86-ms15-106.msu", "", "", @SW_HIDE)
RegWrite("HKEY_LOCAL_MACHINE\Software\abc", "abc", "REG_SZ", "1")---for detection Method
Exit

//


Wednesday, September 30, 2015

AutoIT Sample scripts- for SCCM Packaging


AutoIT Sample scripts 


//Hide tray Icon

Opt("TrayIconHide", 1)

// Add Registry Value

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\ABC", "abc", "REG_DWORD", "0")

// For Sleep/Wait/Pause time

Sleep(60000)

// Running a program .msi or .exe with switches

RunWait("msiexec /i abc.msi ALLUSERS=1 /qn /norestart")

// For registry file or .exe/.msi

ShellExecuteWait("Regedit.exe", "/s abc.reg", "", "", @SW_HIDE)


Sample Script

Opt("TrayIconHide", 1)
RunWait("msiexec /i abc.msi ALLUSERS=1 /qn /norestart")
Sleep(60000)
ShellExecuteWait("Regedit.exe", "/s abc.reg", "", "", @SW_HIDE)
RunWait("abc.bat")
Exit


More Details about AutoIT - https://www.autoitscript.com/site/autoit/

Friday, September 25, 2015

Packaging Enterprise version(x86 & x64) Google Chrome with AutoIT

Packaging Enterprise version Google Chrome with AutoIT

Download Latest version on Chrome Emterprise version.

Create a directory and copy files and create an application in SCCM 2012

1. Chrome msi
2. Install.cmd
3.master_preferences

Please downloaded the file and instaruction from here

install.cmd

msiexec /qn /norestart /i "%~dp0chromeEnterprise44.0.2403.107_x64.msi"
if exist "c:\Program Files\Google\Chrome\Application\master_preferences" copy /y "%~dp0master_preferences" "C:\Program Files\Google\Chrome\Application\master_preferences"
if exist "c:\Program Files (x86)\Google\Chrome\Application\master_preferences" copy /y "%~dp0master_preferences" "C:\Program Files (x86)\Google\Chrome\Application\master_preferences"
reg add HKLM\Software\Policies\Google\Update /f /v AutoUpdateCheckPeriodMinutes /d 0
sc stop gupdate
sc config gupdate start= disabled
sc stop gupdatem
sc config gupdatem start= disabled
del "C:\Program Files\Google\Update\GoogleUpdate.exe"
rmdir /s /q "C:\Program Files\Google\Update"
REM Return exit code to SCCM
exit /B %EXIT_CODE%


Sample master_preferences

"homepage" : "http://msiworld.blogspot.com", 
"homepage_is_newtabpage" : false, 
"browser" : { 
"show_home_button" : true,
 "check_default_browser" : false,
 "window_placement": {
 "bottom": 1000,
 "left": 10,
 "maximized": false,
 "right": 904,
 "top": 10,
 "work_area_bottom": 1010,
 "work_area_left": 0,
 "work_area_right": 1680,
 "work_area_top": 0
 }
 },
 "bookmark_bar" : { 
"show_on_all_tabs" : true 
}, 
"distribution" : { 
"skip_first_run_ui" : true, 
"show_welcome_page" : false, 
"import_search_engine" : false, 
"import_history" : false, 
"create_all_shortcuts" : true, 
"do_not_launch_chrome" : true, 
"make_chrome_default" : false 
}
}

Edit the chrome msi file name as appropriate in .bat. This should also disable auto update but i had issues with disabling auto update using batch so i have created an AutoIT script to make it work every single time it runs- SCCM 2012 R2.

Details about AutoIT


Create a AutoIT Script and compile it. Create an Application in SCCM 2012 using Script and deploy it.

Opt("TrayIconHide", 1)
RunWait( "install.cmd")
RunWait(@ComSpec & " /c " & "taskkill /f /im GoogleUpdate.exe ", "", @SW_HIDE)
$svccfg = "sc config gupdate start= disabled"
RunWait(@ComSpec & " /C " & $svccfg, "", @SW_HIDE)
$svccfg = "sc config gupdatem start= disabled"
RunWait(@ComSpec & " /C " & $svccfg, "", @SW_HIDE)
FileDelete("C:\Program Files\Google\Update\GoogleUpdate.exe")
FileDelete("C:\Program Files\Google\Update\GoogleUpdate.exe")
Exit

Create a packages for x86 & x64 bit. Create an application in SCCM 2012 and choose deployment Type option. Create a Global condition based on Architecture type for X86 & x64 and select Global condition requirement.

When application will be deployed , it will check if the OS is 64 bit, then 64 bit Google chrome will be installed on the system and accordingly for x86.






SCCM 2012 Dynamic collection for Specific System Model - Lenovo Laptops

SCCM 2012 Dynamic collection for Specific System Model - Lenovo Laptops

If you need to create a collection for specic System model for Lenovo Laptops. Please use below query and change Model accordingly.


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_PRODUCT on SMS_G_System_COMPUTER_SYSTEM_PRODUCT.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM_PRODUCT.Version = "ThinkPad x240"