Sulich's Blog

Sulich's Blog

Archive for the category “SCCM”

Accidentally deleted computer from SCCM database

If the computer has been deleted accidentally from the collection or from the database, it can be restored by follow procedures from the client:

  1. Discovery Data Collection Cycle
  2. Hardware Inventory Cycle
  3. Software Inventory Cycle

After few minutes the client will be again into the database

 

SCCM 2012 – Deploying Office 365

https://support.office.com/en-us/article/Deploy-Office-365-ProPlus-with-System-Center-Configuration-Manager-4dd6a023-0a5d-4dc9-9bad-ff70e01840b8?ui=en-US&rs=en-US&ad=US

 

https://support.office.com/en-us/article/Overview-of-the-Office-2016-Deployment-Tool-bb5b62d9-1168-47e9-9d54-15a958acfcca?ui=en-US&rs=en-US&ad=US#bkmk_downloadinstallationfiles

 

 

SCCM – create device collection based on the OU

SCCM_WRK_Pilot collection has bean created by query :

sccm_01

 

sccm_02

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.SystemOUName = “contoso.com/Computers/TestGPO”

 

 

SCCM 2012 Device collections based on Operation Systems

Creating SCCM 2012 device colections based on the operation system:

# Variables
$PWDBegin=$PWD
$CMSiteCode=”001″ # Change this – This should be your site code
$CMModule=’D:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1’ # Change this – This should point to the CM module
Import-Module $CMModule
$CMSiteCode = $CMSiteCode+”:”
Set-Location $CMSiteCode
$schedule = New-CMSchedule -RecurInterval Days -RecurCount 7

New-CMDeviceCollection -Name “Windows 8” -LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows 8” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Workstation 6.2%'” -RuleName “Windows 8”

 

New-CMDeviceCollection -Name “Windows 7” -LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows 7” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Workstation 6.1%'” -RuleName “Windows 7”

 

New-CMDeviceCollection -Name “Windows Vista”-LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows Vista” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Workstation 6.0%'” -RuleName “Windows Vista”

New-CMDeviceCollection -Name “Windows XP”-LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows XP” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Workstation 5.1%'” -RuleName “Windows XP”

New-CMDeviceCollection -Name “Windows Server 2012”-LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows Server 2012” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Server 6.2%'” -RuleName “Windows Server 2012”

New-CMDeviceCollection -Name “Windows Server 2012 R2” -LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows Server 2012 R2” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Server 6.3%'” -RuleName “Windows Server 2012 R2”

New-CMDeviceCollection -Name “Windows Server 2016” -LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows Server 2016” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Server 10%'” -RuleName “Windows Server 2016”

New-CMDeviceCollection -Name “Windows Server 2008 R2”-LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows Server 2008 R2” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Server 6.1%'” -RuleName “Windows Server 2008 R2”

New-CMDeviceCollection -Name “Windows Server 2008”-LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows Server 2008” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Server 6.0%'” -RuleName “Windows Server 2008”

New-CMDeviceCollection -Name “Windows Server 2003”-LimitingCollectionName “All Systems” -RefreshSchedule $schedule
Add-CMDeviceCollectionQueryMembershipRule -CollectionName “Windows Server 2003” -QueryExpression “select SMS_R_SYSTEM.ResourceName,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueNameentifier, SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like ‘%Microsoft Windows NT Server 5.2%'” -RuleName “Windows Server 2003”
Set-Location $PWDBegin

 

Post Navigation