Pages

MSG.Exe : To pass a input to the Batch file for a User inputs / Notification

 

 

msg.exe * /TIME:300 /v /w "Message From IT Administrator: Please Save and close your all office Applications and then click OK"

 

Time:300 seconds will wait for the user input if no input received it will execute it

 

 

Send a message to a user.

MSG {username | sessionname | sessionid | @filename | *}
    [/SERVER:servername] [/TIME:seconds] [/V] [/W] [message]

  username            Identifies the specified username.
  sessionname         The name of the session.
  sessionid           The ID of the session.
  @filename           Identifies a file containing a list of usernames,
                      sessionnames, and sessionids to send the message to.
  *                   Send message to all sessions on specified server.
  /SERVER:servername  server to contact (default is current).
  /TIME:seconds       Time delay to wait for receiver to acknowledge msg.
  /V                  Display information about actions being performed.
  /W                  Wait for response from user, useful with /V.
  message             Message to send.  If none specified, prompts for it
                      or reads from stdin.

SCCM Documentation Updated

Configuration Manager 2007 documentation library (http://technet.microsoft.com/en-us/library/bb680651.aspx) has been updated on the Web with updates for April. Topics that were updated have Updated: April 1, 2011 at the top of the topic.

 

Configuration Manager 2007 Quizzes also updated

 

Configuration Manager 2012 documentation library  Configuration Manager 2012 Documentation Library.

SQL query for Patches required systems as per collection with the SIZE of each update

Below is sql query for  Patches required systems as per collection with the SIZE of each update

 

SELECT DISTINCT
                      TOP (100) PERCENT SYS.Name0 AS [Machine Name], UCS.Status AS [Patch Status Code], UI.BulletinID, UI.ArticleID, UI.Title,
                      dbo.v_FullCollectionMembership.ResourceID, dbo.v_Collection.CollectionID, UI.CI_ID, dbo.CI_Contents.SourceSize /(1024.0*1024) AS SizeinMB
FROM         dbo.v_UpdateContents INNER JOIN
                      dbo.v_FullCollectionMembership INNER JOIN
                      dbo.v_Collection ON dbo.v_FullCollectionMembership.CollectionID = dbo.v_Collection.CollectionID INNER JOIN
                      dbo.v_R_System AS SYS LEFT OUTER JOIN
                      dbo.v_Update_ComplianceStatusAll AS UCS ON SYS.ResourceID = UCS.ResourceID INNER JOIN
                      dbo.v_UpdateInfo AS UI ON UCS.CI_ID = UI.CI_ID ON dbo.v_FullCollectionMembership.ResourceID = UCS.ResourceID ON
                      dbo.v_UpdateContents.CI_ID = UI.CI_ID INNER JOIN
                      dbo.CI_Contents ON dbo.v_UpdateContents.Content_ID = dbo.CI_Contents.Content_ID
WHERE     (UCS.Status IN ('2')) AND (dbo.v_Collection.CollectionID = 'HCC000FB')
ORDER BY UI.ArticleID

Did you checked what is the log file of SCCM DB ? or did you checked what is the backup size and why it is increasing ?

Did you checked what is the log file of SCCM DB ? or did you checked what is the backup size and why it is increasing ?

 

Yes it is because of transaction log size increase … check below query to know the size of the log files….

 

 

 

SELECT name,size from sys.database_files


output:-

name                         size
SMS_SiteCode           662576
SMS_SiteCode_log     3541704

SQL Report with the systems Names and Architecture for specific collection

finding the systems Names and Architecture for specific collection

 

SELECT     dbo.v_Collection.CollectionID, dbo.v_GS_COMPUTER_SYSTEM.Name0, dbo.v_GS_COMPUTER_SYSTEM.SystemType0,
                      dbo.v_GS_COMPUTER_SYSTEM.UserName0, dbo.v_R_System.Operating_System_Name_and0
FROM         dbo.v_Collection INNER JOIN
                      dbo.v_FullCollectionMembership ON dbo.v_Collection.CollectionID = dbo.v_FullCollectionMembership.CollectionID INNER JOIN
                      dbo.v_GS_COMPUTER_SYSTEM ON dbo.v_FullCollectionMembership.ResourceID = dbo.v_GS_COMPUTER_SYSTEM.ResourceID INNER JOIN
                      dbo.v_R_System ON dbo.v_GS_COMPUTER_SYSTEM.ResourceID = dbo.v_R_System.ResourceID
WHERE     (dbo.v_Collection.CollectionID = 'CollectionID')

Required Patches based on collection ID

SELECT DISTINCT
                      TOP (100) PERCENT SYS.Name0 AS [Machine Name], UCS.Status AS [Patch Status Code],
                      CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status', UI.BulletinID, UI.ArticleID, UI.Title,
                      dbo.v_FullCollectionMembership.ResourceID, dbo.v_Collection.CollectionID
FROM         dbo.v_FullCollectionMembership INNER JOIN
                      dbo.v_Collection ON dbo.v_FullCollectionMembership.CollectionID = dbo.v_Collection.CollectionID INNER JOIN
                      dbo.v_R_System AS SYS LEFT OUTER JOIN
                      dbo.v_Update_ComplianceStatusAll AS UCS ON SYS.ResourceID = UCS.ResourceID INNER JOIN
                      dbo.v_UpdateInfo AS UI ON UCS.CI_ID = UI.CI_ID ON dbo.v_FullCollectionMembership.ResourceID = UCS.ResourceID
WHERE     (UCS.Status IN ('3', '2')) AND (dbo.v_Collection.CollectionID = 'CollectionID')
ORDER BY UI.ArticleID

HOW TO: Use Wildcard Search with Various Google Services Read more:

My favorite operator is wildcard because it is able to give you most unexpected and creative results.

Here’s how you can play with it in various Google services:

General Google Search + Wildcard

General Google search allows a lot of flexibility with its wildcard operator.

How it works: * is substituted by one or more words.

When it comes particularly in handy: In combination with “” (exact match) search to control the proximity within a set phrase. This trick can turn particularly useful for content inspiration as well as for keyword research (to expand your initial query):

Google Wildcard search

You can also achieve unexpected results when using the wildcard operator in combination with other search commands. Try:

  • intext:”diabetic * diets”
  • intitle:”diabetic * diets”
  • “diabetic * diets” -food
  • etc

Other Google Search Services + Wildcard

While many people are aware of wildcard search for “Universal” / “blended” results, few users also use the wildcard operator for other types of search results. Wildcard operator is also supported by multiple search engines run by Google:

  • Google images
  • Google video and Youtube;
  • Blog search;
  • Google news;
  • Google Shopping
  • etc

How it works: * is substituted by one or more words.

When it comes particularly in handy:

Here are a few example of how the search operator can turn particularly useful:

  • Find video content inspiration; example: ["blogging * wordpress"]
  • Customize your Google News RSS feed (to use it to track your brand mentions or to monitor new opportunities); example: ["guest * post *"]
  • Expand your search to include various possible variations; for example, to track new articles by “guest author” (and thus track new guest blogging opportunities), use this query in Google Blog Search: [inpostauthor:"guest * author" OR inpostauthor:"guest author"]

Blog search + wildcard

Google Reader + Wildcard

If you are an active Google Reader user and have plenty of relevant feeds in it, take the full advantage of its search functionality.

How it works: * is substituted by one word. To get two words within your phrase, use two asterisks.

When it comes particularly in handy: Google Reader is your personal collection of relevant feeds. Using it for keyword and content inspiration may turn much more effective than using generic search results.

Google Reader search

Gmail Search + Wildcard

How it works: * is substituted by one or more words.

When it comes particularly in handy: Gmail is another useful collection of resources and links dirctly related to you, what you read and what you are subscribed to. I have once shared how Gmail search can turn a great help in your keyword and content research. With wildcard, this idea is even more effective.

A wildcard operator can also turn a great help for searching Gmail attachments: filename:google*.doc – This one filters emails to only those that have doc files attached and these files have [google] in the beginning of the name (whereas filename:*google*.doc searches for messages that have documents attached with “google” mentioned somewhere in the middle of the file name).

Here’s the example set of this search and the results it triggers:

Gmail search results

Now, go play with search results to your heart’d content!

Read more: http://www.searchenginejournal.com/how-to-use-wildcard-search-with-various-google-services/28911/#ixzz1Jr4rIdoT

One other Good Website for SCCM

http://certcollection.org/forum/forum/88-sms-sccm-2007/

Collections:

 

Computer that failed to run an advertisement:
select sys.ResourceID,sys.ResourceType,sys.Name,sys.SMSUniqueIdentifier,sys.ResourceDomainORWorkgroup,sys.Client from sms_r_system as sys inner join SMS_ClientAdvertisementStatus as offer on sys.ResourceID=offer.ResourceID  WHERE AdvertisementID = ‘A0120005′ and LastStateName = ‘Failed’

Computer that ran an advertisement successfully:
select sys.ResourceID,sys.ResourceType,sys.Name,sys.SMSUniqueIdentifier,sys.ResourceDomainORWorkgroup,sys.Client from sms_r_system as sys inner join SMS_ClientAdvertisementStatus as offer on sys.ResourceID=offer.ResourceID  WHERE AdvertisementID = ‘A0120005′ and LastStateName = ‘Succeeded’

Notice for both collections you need to find the unique advertisement ID

Workstation computers that have not restarted the last 7 days:
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.Caption like "%xp%" or SMS_G_System_OPERATING_SYSTEM.Caption like "%vista%" or SMS_G_System_OPERATING_SYSTEM.Caption like "%windows 7%") and (DateDiff(day, SMS_G_System_OPERATING_SYSTEM.LastBootUpTime, GetDate()) >7)

All Obsolete Clients:

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.Obsolete = 1

All Inactive Clients:

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.Active = 0

All Clients without a Config Mgr. Agent installed:

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.Client is null

All Unapproved clients

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_CM_RES_COLL_SMS00001 on SMS_CM_RES_COLL_SMS00001.ResourceId = SMS_R_System.ResourceId where SMS_CM_RES_COLL_SMS00001.IsApproved<>1

sccm For Desktops only report

For Desktops only report

 

SELECT     TOP (100) PERCENT dbo.v_R_System.Name0 AS [Computer Name], dbo.v_R_System.User_Name0 AS [User Name],
                      dbo.v_R_System.User_Domain0 AS [Domain Name], dbo.v_GS_SYSTEM_ENCLOSURE.Manufacturer0 AS Manufacturer,
                      dbo.v_GS_COMPUTER_SYSTEM.Model0 AS Model, dbo.v_GS_SYSTEM_ENCLOSURE.SerialNumber0 AS [Serial Number],
                      dbo.v_GS_SYSTEM.SystemRole0 AS [System OS Type], dbo.v_GS_SYSTEM.SystemType0 AS [System Type]
FROM         dbo.v_GS_SYSTEM_ENCLOSURE INNER JOIN
                      dbo.v_R_System ON dbo.v_GS_SYSTEM_ENCLOSURE.ResourceID = dbo.v_R_System.ResourceID INNER JOIN
                      dbo.v_GS_SYSTEM ON dbo.v_R_System.ResourceID = dbo.v_GS_SYSTEM.ResourceID INNER JOIN
                      dbo.v_GS_COMPUTER_SYSTEM ON dbo.v_GS_SYSTEM.ResourceID = dbo.v_GS_COMPUTER_SYSTEM.ResourceID
WHERE     (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '3') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '4') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '5') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '6') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '7') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '15') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '16')
ORDER BY [Computer Name]

SQL Report for only Laptop Computers

 

 

If your boss ask to get list of laptops which are managed by SMS or SCCM.what do you do and how do you get that. Right click on computer and go to resource explorer to identify the computer is Laptop or Desktop ?

You can identify if the computer is Laptop or Desktop based on its chassis Types.

Below are listed the Chassis types available to create SCCM collection or reports.

For Laptops Chassis Types : 8 , 9, 10, 11, 12, 14, 18, 21

For Desktop Chassis Type : 3, 4, 5, 6, 7, 15, 16

For server Chassis  Type: 23

 

 

 

 

 

 

 

 

SELECT     dbo.v_R_System.Name0 AS [Computer Name], dbo.v_R_System.User_Name0 AS [User Name], dbo.v_R_System.User_Domain0 AS [Domain Name],
                      dbo.v_GS_SYSTEM_ENCLOSURE.Manufacturer0 AS Manufacturer, dbo.v_GS_COMPUTER_SYSTEM.Model0 AS Model,
                      dbo.v_GS_SYSTEM_ENCLOSURE.SerialNumber0 AS [Serial Number], dbo.v_GS_SYSTEM.SystemRole0 AS [System OS Type],
                      dbo.v_GS_SYSTEM.SystemType0 AS [System Type]
FROM         dbo.v_GS_SYSTEM_ENCLOSURE INNER JOIN
                      dbo.v_R_System ON dbo.v_GS_SYSTEM_ENCLOSURE.ResourceID = dbo.v_R_System.ResourceID INNER JOIN
                      dbo.v_GS_SYSTEM ON dbo.v_R_System.ResourceID = dbo.v_GS_SYSTEM.ResourceID INNER JOIN
                      dbo.v_GS_COMPUTER_SYSTEM ON dbo.v_GS_SYSTEM.ResourceID = dbo.v_GS_COMPUTER_SYSTEM.ResourceID
WHERE     (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '8') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '9') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '10') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '11') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '12') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '14') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '18') OR
                      (dbo.v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 = '21')

SCCM report for hardware specs of all desktops and laptops on the domain

 

 

 

---select * from v_GS_SYSTEM_ENCLOSURE

SELECT  distinct
CS.name0 as 'Computer Name',
CS.domain0 as 'Domain',
CS.UserName0 as 'User',
BIOS.SerialNumber0 as 'Bios serial',
SE.SerialNumber0 as 'System Enclosure serial',
CS.Manufacturer0 as 'Manufacturer',
CS.Model0 as 'model',
OS.Caption0 as 'OS',
RAA.SMS_Assigned_Sites0 as 'Site',
RAM.TotalPhysicalMemory0 as 'Total Memory',
sum(isnull(LDisk.Size0,'0')) as 'Hardrive Size',
sum(isnull(LDisk.FreeSpace0,'0')) AS 'Free Space',
CPU.MaxClockSpeed0 as 'Max CPU Speed',
CPU.Name0 as 'CPU Model',
CPU.Is64Bit0 as '64 Bit Compatible'
from 
  v_GS_COMPUTER_SYSTEM CS right join v_GS_PC_BIOS BIOS on BIOS.ResourceID = CS.ResourceID
right join v_GS_SYSTEM SYS on SYS.ResourceID = CS.ResourceID 
right join v_GS_OPERATING_SYSTEM OS on OS.ResourceID = CS.ResourceID 
right join v_RA_System_SMSAssignedSites RAA on RAA.ResourceID = CS.ResourceID
right join V_GS_X86_PC_MEMORY RAM on RAM.ResourceID = CS.ResourceID
right join v_GS_Logical_Disk LDisk on LDisk.ResourceID = CS.ResourceID
right join v_GS_Processor CPU on CPU.ResourceID = CS.ResourceID   
right join v_GS_SYSTEM_ENCLOSURE SE on SE.ResourceID = CS.ResourceID
where
LDisk.DriveType0 =3
group by
CS.Name0,
CS.domain0,
CS.Username0,
BIOS.SerialNumber0,
SE.SerialNumber0,
CS.Manufacturer0,
CS.Model0,
OS.Caption0,
RAA.SMS_Assigned_Sites0,
RAM.TotalPhysicalMemory0,
CPU.MaxClockSpeed0,
CPU.Name0,
CPU.Is64Bit0
ORDER BY CS.name0

SCCM collection to list all the Laptop computers only

SELECT Caption0 as 'Operating System',CSDVersion0 as 'Service Pack', COUNT(*) AS 'Count'
FROM v_GS_OPERATING_SYSTEM,v_R_System
WHERE v_GS_OPERATING_SYSTEM.Resourceid=v_R_System.Resourceid
GROUP BY Caption0,CSDVersion0
ORDER BY Caption0,CSDVersion0

What is Altiris and what are the modules it has inside??

Altiris service-oriented management solutions provide a modular and future-proof approach to managing highly diverse and widely distributed IT infrastructures. They are open solutions that enable lifecycle integration of client, handheld, server, network and other IT assets with audit-ready security and automated operation.

below are the modules it has inside.

  • Asset Management Suite
  • Backup Exec System Recovery Solution
  • Client Management Suite
  • Deployment Solution
  • ServiceDesk
  • Inventory Solution
  • IT Management Suite
  • Endpoint Virtualization Suite
  • SecurityExpressions
  • Server Management Suite
  • Wise Package Studio
  • Workflow