Sunday, September 13, 2015

SCCM Queries



Is Installed Query : Internet Explorer 11

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_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "iexplore.exe" and SMS_G_System_SoftwareFile.FilePath like "%Program Files%" and SMS_G_System_SoftwareFile.FileVersion like "11%"

Or via Applications installed (Control Panel)

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_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "CtrlWork%"





Search by Network Name or Last logon username


_Search by Network Name:


select Name, IPAddresses, LastLogonUserName, MACAddresses, ResourceId, ResourceType from  SMS_R_System where Name like ##PRM:SMS_R_System.Name## order by Name, IPAddresses, LastLogonUserName, MACAddresses




_Search by Last Logon Username:


select Name, LastLogonUserName, IPAddresses, MACAddresses, ResourceId, ResourceType from  SMS_R_System where LastLogonUserName like ##PRM:SMS_R_System.LastLogonUserName## order by Name, LastLogonUserName, IPAddresses, MACAddresses




_Search Application AddRemove Name:


select SMS_R_System.Name, SMS_R_System.IPAddresses, SMS_R_System.LastLogonUserName, SMS_R_System.MACAddresses, SMS_R_System.ResourceId, SMS_R_System.ResourceType from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like ##PRM:SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName## order by SMS_R_System.Name, SMS_R_System.IPAddresses, SMS_R_System.LastLogonUserName, SMS_R_System.MACAddresses




_Search Active Directory Security Groups:


(Contains data only from AD Security Group Discovery, not NT User Group Discovery.)

select Name, UsergroupName, WindowsNTDomain, NetworkOperatingSystem, AgentName, AgentSite, AgentTime, ResourceId, ResourceType, UniqueUsergroupName from sms_r_usergroup where AgentName = "SMS_AD_SECURITY_GROUP_DISCOVERY_AGENT"




_Package ID:


select packageid, name from sms_package




_Collection ID:


select collectionid, name from sms_collection

_AD User group Collection


select

SMS_R_USER.ResourceID,SMS_R_USER.ResourceType,SMS_R_USER.Name,SMS_R_USER.UniqueUserName,SMS_R_USER.WindowsNTDomain

from SMS_R_User

where SMS_R_User.UserGroupName = "<Domain>\\<AD Group>"

Tuesday, September 1, 2015

Google Earth Pro 7.1.5

This process is based on Windows 7 64-bit and Google Earth Pro 7.1.5.

https://docs.google.com/viewer?a=v&pid=forums&srcid=MDIyODIxNTE2ODcxMjA5NzI3MzABMTAzNTYwMTU0MzgyMzg3MDQ4ODABTGg1Y3RUR3VxS2tKATAuMQFnb29nbGVwcm9kdWN0Zm9ydW1zLmNvbQF2Mg

•Download and install GEP on a computer such as a test computer. Make note of the time when you start the install. We need it to help identify the MSI file.
•Go to C:\Windows\Installer\ and locate the MSI file with the date and time stamp matching the time you performed the install. The MSI file should be approximately 30 MB. Note: ..\Installer\ is a hidden folder. If you don't see it in C:\Windows it is because you are browsing and "Hide protected operating system files" is enabled. Type the full path into Windows Explorer or turn off "Hide protected..."
•Copy the MSI from C:\Windows\Installer\ to a network share that you will use for deployment. Rename the MSI to something logical such as GoogleEarthProWin.msi
•Launch GEP after installation on the test computer and complete the license registration window. Because GEP is now free you do not have to do the online registration process as was done when you had to buy a license. Instead, just enter a legitimate email address in the Username field and "GEPFREE" in the License Key field. Click "Log In" when done.
 Recommended if you want a good deployment:
 - Enable automatic login
 - Enable for all users...
•Close GEP
•Open Registry Editor (regedit.exe) and navigate to:
 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Google Earth Pro
 For 32-bit Windows then: HKEY_LOCAL_MACHINE\Software\Google\Google Earth Pro
•Optional but recommended. Why? Because users will be users. Add the following reg keys and values to the same key path as above:
 Hide the "Deactivate" option from the GEP Help menu:
 - Right click on the Google Earth Pro folder and click on New > DWORD Value
 - Rename the entry to "DisableDeactivation"
 - Right click on the entry and choose Modify...
 - Set the "Value data" to 1.
 Hide the Username and License Key from the GEP Help>About menu info:
 - Right click on the Google Earth Pro folder and click on New > DWORD Value
 - Rename the entry to "hideUserData"
 - Right click on the entry and choose Modify...
 - Set the "Value data" to 1.
•Launch GEP and verify that your registry keys are working. You should not be able to Deactivate GEP from the Help menu and you should not be able to see the Username nor License Key from the Help>About Google Earth window.
•Go back to Registry Editor and the location HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\
 (For 32-bit Windows then: HKEY_LOCAL_MACHINE\Software\Google\)
•Right click on the Google Earth Pro folder and choose Export. Save the registry file to the same network share location as the MSI for deployment. Give it a logical name so you don't wonder what the heck it is in the future.
•Below are commands to silently install Google Earth Pro and the registry file. Use your favorite deployment method from here. I personally like PDQ Deploy. Depending on your deployment method you may or may not need to add paths to the msi file and reg file in the commands below.
Silent install: msiexec.exe /i "GoogleEarthProWin.msi" ALLUSERS=1 /qn /norestart /log install.log
Silent Registry file install: regedit.exe /s "GoogleEarthPro715.reg"

Resources:
ITninja: http://www.itninja.com/software/google/earth-pro/7-pro
  
Google Maps and Earth Help Forum: "Unattended Install of Google Earth Pro" - March 18, 2015:
https://productforums.google.com/forum/?utm_medium=email&utm_source=footer#!msg/maps/NhT3W2ZameI/-47sGr53vvQJ