SCCM query to populate Device collection

Hi!

In SCCM if you want to build a Device Query based on their OS version you can apply the following 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 “%workstation%”   and SMS_R_System.OperatingSystemNameandVersion like “%6.2%” and SMS_G_System_COMPUTER_SYSTEM.SystemType = “x86-based PC”

Where %workstation% is to populate only workstations but if you prefeer servers change it for %server%

Where %6.2% is the OS version. In the below link you will find the OS version that you are loooking for, change it on the query 🙂

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx

And also, if you need to know the architecture, you can indicate if 64 or 32 bits indicating “x86-based PC” or “x64-based PC” 

Regards!

 

Anuncios

Creating Device Query based on Language ID in SCCM

Hi!

To create a collection populated with computers based on their language ID use the following 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 inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.OSLanguage = 3082

Where 3082 is the language ID that you are interested.

In the following link you can find all language IDs

https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx

Regards!

Requisites and commands to connect to O365 – Exchange Online

Hi guys,

To connect to Exchange Online thru powershell install:

Windows Azure Active Directory Module for Windows PowerShell

http://go.microsoft.com/fwlink/p/?linkid=236297

Microsoft Online Services Sign-In Assistant for IT Professionals RTW:
http://go.microsoft.com/fwlink/p/?linkid=286152

Once installed, execute powershell console and import Azure modules to your powershell session, after login to your tenant with:

  • $UserCredential = Get-Credential
  • $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  • Import-PSSession $Session

It’s all.

Regards