Create a system properties Query in SCCM 2012 r2

Hi,
I am trying to create a query to find the "Computer description" field information for devices, but i am not sure of what criteria if any to select. 
I was able to successfully create a query statement that finds the description information for a device, but that pulls only the AD object field information and not the local device information as described above.

Is this the one?
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.Description != 'Staff Device'

Similar Messages

  • System Uptime Query in SCCM 2012 R2

    what is the Query language statement to find the uptime of a system in SCCM 2012 R2? There are so many Object types that it is hard to see if anyone of them has this option.
    Thanks

    SELECT TOP (100) PERCENT dbo.v_R_System.Name0, dbo.v_GS_OPERATING_SYSTEM.LastBootUpTime0, DATEDIFF(Day, dbo.v_GS_OPERATING_SYSTEM.LastBootUpTime0, GETDATE()) AS [Days since last boot],
    dbo.v_GS_OPERATING_SYSTEM.Caption0
    FROM dbo.v_GS_OPERATING_SYSTEM INNER JOIN
    dbo.v_R_System ON dbo.v_GS_OPERATING_SYSTEM.ResourceID = dbo.v_R_System.ResourceID
    WHERE (DATEDIFF(Day, dbo.v_GS_OPERATING_SYSTEM.LastBootUpTime0, GETDATE()) > 7) AND (dbo.v_GS_OPERATING_SYSTEM.Caption0 LIKE '%server%')
    ORDER BY [Days since last boot] DESC
    This is something I built before.
    It shows you server systems that have been online for more than 7 days.
    You can modify it to your needs.

  • Create Report based on Query in SCCM 2012

    I have a lot of useful queries, however I would like to create a few reports based on these queries. What is the simple way to do this? I started to create a New Report, but kind of lost after that. Is there a way I can just copy my statement from the
    query to a blank report?

    Execute the WQL query from the queries node in the console and watch smsprov.log on the site server. It should contain the "translated" SQL statement.
    Torsten Meringer | http://www.mssccmfaq.de

  • Create a query in SCCM 2012 R2 for NIC Driver Version

    Hello,
        Is there a way to create a query for the specific NIC driver versions with SCCM 2012 R2? For example I can do this and other descriptors for video i.e.,
    select SMS_R_System.Name, SMS_R_System.LastLogonUserName, SMS_R_System.HardwareID, SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_G_System_COMPUTER_SYSTEM.Model, SMS_G_System_VIDEO_CONTROLLER.DriverVersion, SMS_G_System_VIDEO_CONTROLLER.Description, SMS_G_System_VIDEO_CONTROLLER.VideoProcessor
    from  SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_VIDEO_CONTROLLER on SMS_G_System_VIDEO_CONTROLLER.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Model
    like "HP EliteBook Revolve 810 G2" and SMS_G_System_VIDEO_CONTROLLER.Description like "%intel%"
    Is there a script that will give the version for NICs?
    Thanks Bill

    This article provides one way to do it:
    http://blogs.technet.com/b/configmgr_geek_speak/archive/2013/11/10/inventorying-and-reporting-network-adapter-driver-details-and-how-to-report-only-the-wireless-type-in-configuration-manager-2012.aspx
    Jeff

  • Using a environment variable that was created during the Task Sequence process - SCCM 2012 R2

    Hi,
    I'm triyng to use a environment variable that is create in the beginning of the Task Sequence.
    1. I'm using a VBScript that get the Exit Code of an application, and create the environment variable "iReturn" with the value of the exit code. (This is working)
    2. I add this variable in the CustomSettings.ini, like this "iReturn=%iReturn%
    3. After the step that I run the VBScript I put the "Gather" step to get the variables, but looking in the BDD.log the iReturn variable appears the same as the CustomSettings.ini configuration "iReturn=%iReturn%". (But, if I put a "Restart
    Computer" step after the VBScript, the BDD.log shows the iReturn variable with the right code.)
    Question: How can I update the environment variable of Windonws XP to use in the Task Sequence without restart.
    OR
    How can I configure autologon in SCCM 2012 (if have no way to update withou restart computer).
    I already tried the autologon with registry settings and a specific user, If I starts the process with this user works, but If I starts the process with other user, after the autologon the process doesnt continue, I have to do logoff and login with the user
    that I started the process.
    PS: All this steps have to be executed before the WinPE phase. 

    Environment variables must be explicitly set every time a system boots so unless you have a process to repopulate it after the reboot, it won't persist automatically.
    Why not store the value in a task sequence variable so that it persists after a reboot?
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • Problem to create an ip range collection on sccm 2012 sp1

    Hi everybody,
    I need to create an ip range query to a collection, i saw a lot of explanations:
    I create this query for the ip range 10.201.0.50 10.201.0.254
    select *
    from  SMS_R_System
    where  IPAddresses like "10.201.0.[5-9][0-9]"
                or IPAddresses like "10.201.0.1[0-9][0-9]"
                or IPAddresses like "10.201.0.2[0-5][0-4]"
    But nothing machines display
    In the general tab it's empty, is it normal?
    thanks guys !!

    Hi,
    Try it like this
    select *
    from  SMS_R_System
    where  IPAddresses like '10.201.0.[5-9][0-9]%'
                or IPAddresses like '10.201.0.1[0-9][0-9]%'
                or IPAddresses like '10.201.0.2[0-5][0-4]%'
    Regards,
    Vahé

  • Add site system role through automation, SCCM 2012 Sp1

    hi
    Trying to add a reporting point through powershell or the SDK with no luck.
    Does any out there have any idea how to do this? We are trying to automate the process of everything.
    When adding through powershell its a sucess with the role itself, but when accessing the reporting node the console crashes and the links are missing.
    Any ideas or tips?
    Regards
    Lasse
    shaggys

    This was finally fixed in
    CU3 for SCCM 2012 R2 and I can confirm that it does work with CU4 for SCCM 2012 R2.
    One note is that the cmdlet documentation is not 100% accurate.  For example, the example listed in get-help excludes required parameters.  Also, the parameter descriptions are not descriptive enough without knowing additional information
    about the role/point.  Here is what worked for me:
    Add-CMReportingServicePoint-SiteCode$SiteCode-SiteSystemServerName$SCCMpriFQDN-DatabaseServerName$SCCMpriFQDN-DatabaseName"CM_$SiteCode"-ReportServerInstance$SCCMsqlDatabaseInstanceName -FolderName"ConfigMgr_$SiteCode"-UserName$CMAaccountConfiguredAsSSRSexecutionAccount

  • Query about SCCM 2012 R2 Client Installation

    Hello I had one SCCM 2012 RTM environment with 1000+ clients,
    Now on the same machine I have uninstalled everything and installed fresh SCCM 2012 R2 software with same site Code etc..
    Kindly suggest me an easy way to upgrade all my SCCM clients to 2012 R2? and How do i verify the same?

    Hi,
     Currently, the clients cannot accept the policies from SCCM 2012 R2 MP, so Push installation, GP installation and manual installation should work. After upgrade, the GUID of clients will remain.
    Juke Chou
    TechNet Community Support

  • SQL Server 2012 deployment with System Center Configuration Manager (SCCM) 2012

    hi,
    we have tried to deploy the SQL Server 2012 to our development machines with SCCM 2012 without success.
    Commandline parameters or Configuration.ini in either case the installation failed without any useful errorlog.
    Exists any howto which covers this scenario?
    regards
    genne

    Hello,
    Please see the following article about some requirements for SQL Server instances intended for SCCM 2012:
    http://www.sqlcoffee.com/Tips0019.htm
    Could please check to see if a Summary.txt log file exists after those installation attempts? The following article may help you locate the file on disk:
    http://technet.microsoft.com/en-us/library/ms143702(v=sql.110)
    Please share this log file with us, if possible.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • NETWORK PRINTER INVENTORY IN SYSTEM CENTRE CONFIGURATION MANAGER (SCCM 2012).

    SCCM HW inventory agent runs as the ‘SYSTEM’ and cannot see the end-users network drives and printers. The following two step process will help circumvent the above stated limitation.
    1) CREATE HKEY_LOCAL_MACHINE\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS PATH IN THE REGISTRY.
    Create a SCCM package.
    The package should run as administrator.
    The package should run whether or not a user is logged on.
    POWERSHELL PACKAGE 1 (Prerequisite):
    if (!(Test-Path HKLM:\SOFTWARE\SCCMINVENTORY)) {new-item HKLM:\SOFTWARE\SCCMINVENTORY -ErrorAction SilentlyContinue}
    $perm = get-acl HKLM:\SOFTWARE\SCCMINVENTORY -ErrorAction SilentlyContinue
    $rule = New-Object System.Security.AccessControl.RegistryAccessRule("Authenticated Users","FullControl", "ContainerInherit, ObjectInherit", "InheritOnly", "Allow") -ErrorAction SilentlyContinue
    $perm.SetAccessRule($rule)
    Set-Acl -Path HKLM:\SOFTWARE\SCCMINVENTORY $perm -ErrorAction SilentlyContinue
    if (!(Test-Path HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS)) {new-item HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS -ErrorAction SilentlyContinue}
    SAVE POWERSHELL FILE AS: PrinterInvRegSetup.ps1
    SETUP THE SCCM PACKAGE/PROGRAM WITH COMMAND LINE:
    %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\PowerShell.exe -NonInteractive -WindowStyle Hidden -noprofile -ExecutionPolicy Bypass -file .\PrinterInvRegSetup.ps1
    2) CAPTURE CURRENT USER’S PRINTERS AND WRITE THOSE ENTRIES TO THE ABOVE CREATED REGISTRY KEYS.
    Create a SCCM package
    The package should be run only when a user is logged in.
    POWERSHELL PACKAGE 2 (Main):
    $printers = Get-WMIObject -class Win32_Printer -ErrorAction SilentlyContinue|select-Object -Property ServerName,ShareName,Location,DriverName,PrintProcessor,PortName,Local |Where-Object {$_.Local -ne $true}-ErrorAction SilentlyContinue
    ForEach($printer in $printers){
    $PServerName= $printer.ServerName -replace ('\\','')
    $PShareName = $printer.ShareName
    $PLocation = $printer.Location
    $PDriverName = $printer.DriverName
    $PPrintProcessor = $printer.PrintProcessor
    $PPortName = $printer.PortName
    if ((Test-Path HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS)) {
    if ((Test-Path "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName")) {
    Remove-item "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Force -ErrorAction SilentlyContinue
    New-item "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -ErrorAction SilentlyContinue
    New-ItemProperty "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Name "PrintServer" -Value $PServerName -PropertyType "String" -ErrorAction SilentlyContinue
    New-ItemProperty "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Name "PrinterQueue" -Value $PShareName -PropertyType "String" -ErrorAction SilentlyContinue
    New-ItemProperty "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Name "PrinterLocation" -Value $PLocation -PropertyType "String" -ErrorAction SilentlyContinue
    New-ItemProperty "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Name "PrinterDriver" -Value $PDriverName -PropertyType "String" -ErrorAction SilentlyContinue
    New-ItemProperty "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Name "PrintProcessor" -Value $PPrintProcessor -PropertyType "String" -ErrorAction SilentlyContinue
    New-ItemProperty "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Name "PrinterPortName" -Value $PPortName -PropertyType "String" -ErrorAction SilentlyContinue
    New-ItemProperty "HKLM:\SOFTWARE\SCCMINVENTORY\NETWORKPRINTERS\$PShareName on $PServerName" -Name "DateInventoried" -Value $(get-date) -PropertyType "String" -ErrorAction SilentlyContinue
    SAVE POWERSHELL FILE AS: NetworkPrinterInventory.ps1
    SETUP THE SCCM PACKAGE/PROGRAM WITH COMMAND LINE:
    %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\PowerShell.exe -NonInteractive -WindowStyle Hidden -noprofile -ExecutionPolicy Bypass -file .\NetworkPrinterInventory.ps1
    3) CREATE A DEPLOYMENT AND SET IT TO ‘RUN ALWAYS’ AND MAKE IT A REQUIREMENT.
    Now deploy the second package and set the first package as a prerequisite (Check the box – Always run the prerequisite package)
    The deployment should be set to run every 4 hours and ‘Always rerun’. Mark the deployment as required. 
    4) ADD THE FOLLOWING IN BETWEEN THE EXTENSION SECTION WITHIN YOUR CONFIGURATION.MOF.
    //========================
    // Added extensions Start
    //========================
    #pragma namespace ("\\\\.\\root\\cimv2")
    #pragma deleteclass("NETWORKPRINTERS", NOFAIL)
    [dynamic, provider("RegProv"), ClassContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SCCMINVENTORY\\NETWORKPRINTERS")]
    Class NETWORKPRINTERS
    [key] string KeyName;
    [PropertyContext("PrintServer")] String PrintServer;
    [PropertyContext("PrinterQueue")] String PrinterQueue;
    [PropertyContext("PrinterLocation")] String PrinterLocation;
    [PropertyContext("PrinterDriver")] String PrinterDriver;
    [PropertyContext("PrintProcessor")] String PrintProcessor;
    [PropertyContext("PrinterPortName")] String PrinterPortName;
    [PropertyContext("DateInventoried")] String DateInventoried;
    //========================
    // Added extensions end
    //========================
    5) SAVE THE BELOW DATA INTO A FILE CALLED ‘AWESOME.MOF’.
    #pragma namespace (“\\\\.\\root\\cimv2\\SMS”)
    #pragma deleteclass(“NETWORKPRINTERS”, NOFAIL)
    [SMS_Report(TRUE),SMS_Group_Name("NETWORKPRINTERS"),SMS_Class_ID("NETWORKPRINTERS")]
    Class NETWORKPRINTERS: SMS_Class_Template
    [SMS_Report(TRUE),key] string KeyName;
    [SMS_Report(TRUE)] String PrintServer;
    [SMS_Report(TRUE)] String PrinterQueue;
    [SMS_Report(TRUE)] String PrinterLocation;
    [SMS_Report(TRUE)] String PrinterDriver;
    [SMS_Report(TRUE)] String PrintProcessor;
    [SMS_Report(TRUE)] String PrinterPortName;
    [SMS_Report(TRUE)] String DateInventoried;
    6) IMPORT ‘AWESOME.MOF’ INTO SCCM DEFAULT CLIENT SETTINGS.
    Either import the above MOF file into the Client Setting/Default Client Settings/Hardware Inventory/Classes/Import. Select the option to import every thing.
    Alternatively, if you have compiled the MOF manually on the PC, Add a new reporting class by clicking the ‘Add’ button and connecting to the PC and selecting the WMI class ‘NETWORKPRINTERS‘
    and that is it. The SCCM resource explorer should soon see the Network Printers.
    Now, this is a convoluted process but this is the only way I can inventory Network printers. Any ideas or suggestions?

    All the other ways are similar because this is a per-user setting.
    http://blogs.technet.com/b/breben/archive/2013/08/26/inventory-mapped-drives-in-configmgr-2012.aspx
    Juke Chou
    TechNet Community Support

  • WMI Query to SCCM 2012 results zero results in c#

    In 2007 this works without issues, however in 2012 when attempting the 2nd query it returns zero results.  However if I do this manually I can produce results...Here is my code:
    using (WqlConnectionManager connection = Connect(getServer))
       string query = "select * from SMS_ObjectContainerItem WHERE ContainerNodeID='" + ProfileID + "'";              
       foreach (IResultObject getobject in connection.QueryProcessor.ExecuteQuery(query))
         getPackageID = getobject["InstanceKey"].StringValue;
         query = "select * from SMS_Collection WHERE CollectionID='" + getPackageID + "'";
    **This is where it will return zero results**
         foreach (IResultObject searchID in connection.QueryProcessor.ExecuteQuery(query))
            CMProfiles profile = new CMProfiles();
            profile.Name = searchID["Name"].StringValue;
            profile.ID = getPackageID;
            results.Add(profile);
    I'm pulling my hairs trying to understand by the 2nd query is not returning any results. When this works fine in SCCM 2007

    What you are using here are the SDK libraries, which are admittedly very thin wrappers around WMI, but not quite.  Have you tried implementing this directly using WMI?  I have written software that manipulates 2007 / 2012 and eventually found that
    the SDK libraries just sort of got in my way, so now I do all of my interactions with SCCM directly with WMI and forgoe the SDK libraries.
    Before I changed over, I did find that there are some oddities in using the SDK.  What I eventually found that worked for me was to bind to the 2007 SDK libraries, deliver them with my application and use the 2007 libraries regardless of if I was connecting
    to 2007 or 2012.  What I found was that I would run into issues using the 2012 libraries to talk to 2007, but the 2007 libraries would work fine with both.
    I have tested your queries, directly using WMI and PowerShell on a 2012 server and they work fine.  I am presuming that the folder that you are attempting to access is a Device Collection folder.
    Once again, I would suggest using WMI directly, especially if making a product that will work with 2007 and 2012; you will be a much happier person.
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • Creating jdbc System based Query iView

    Hello SDN,
    I tried to create a Query-iView based on a jdbc system. So far so good everythings working fine, except in Step 3 of the iView wizard i can't see all dbo Tables of the MS sQL Server 2000 Database i wanna connect to. Actually i get the first 100 Table entries.
    Question is: Is there any way to to show all the table entries in the iView wizard?
    Every hint is appreciated
    Portal Version is NW2005 SPS15
    Thanks in advance
    Markus

    Hi Saravanan,
    we are facing the same problem but unfortunately there is no search field in step3 of the iView wizard, and therefore it seems to me that there is no opportunity to select a table that is not included in the first 100 Table entries.
    Of course I could develope an iView by myself and deploy it to the portal, but the goal of a query iView is in my understanding to create such a ResultSet quite easily.
    Is there any other way i could show all the tables in the wizard?
    Thanks.
    Holger
    Message was edited by: Holger Gerhardt

  • System Discovery Issues in SCCM 2012

    SCCM is not discovering all resources from AD OU. What could be the reason for this. This is not happening for all OU's but randomly for some of them.
    Is there a method to force the system discovery to run instantly ?

    Thanks Jason,
    I think my query was mixed up.
    2) Will the status be NO client ?, If yes, does that mean the complete
    cycle will start again? Meaning as the client is already inactive, it will not send any more hearbeat and configmgr will again wait for the specified days before deleting it again ?
    I know the difference between AD and Heartbeat discovery. I am trying to get a clear difference between
    delete Inactive discovery data and delete
    aged discovery data.
    I checked a blog, I think this is from you http://www.myitforum.com/forums/Delete-aged-discovery-data-and-delete-inactive-client-discovery-data-m204924.aspx
    , where it says "For the Delete Inactive Client Discovery
    Data task, if you haven't cleaned up AD, the object will get recreated (without the client installed flag). If you auto client push enabled, ConfigMgr will try to push to the system again"
    What I get from here is, client status will be NO when it is rediscovered from AD.
    Now if the machine was already deleted with Delete Inactive discovery data maintenance task, and its rediscovered, the client will again become Inactive as the machine is
    not in use. Will the Inactive discovery maintenance task wait again for defined days before it deletes this machine from the database.

  • How to query in SCCM 2012 to know how many active and inactive clients in a specific time and date

    Dear Everyone,
    Good morning. I need to perform a query to know how many clients PCs are active or inactive during the a specific time and date (let say, today 9pm). In my query, I want to know:
    1. How many client PCs is active at that time and date?
    2. How many client PCs is not inactive at that time and date?
    Any assistance is greatly appreciated. Thanks.

    Thank you Gerry for pointing out that it doesn't show real time date. I do agree with that. However, I am look at the (at least in this) report which supposed to [description] shows a list of computers not reporting any power activity for a specified date
    and time. Since I can only key in date in my selection (time option not given), I am expecting the report to show me whether there any client PCs that doesn't any power activity for the specified date. A list was generated, and a number of them shows HardwareInventoryScan,
    LastHeartBeatScan and LastPolicyRequest on the same date itself. I would like to know why these appears, so that I can learn from it.
    Due to the selection option given, I can't expect my original goal, but at least (hopefully) I can get to know (past event) how many and which client PCs is not powered on a particular date based on the date and collection selected.
    At least by getting explainations, I hope to learn something from this (how to read this report). Thanks in advance.

  • Create report subscription with powershell in SCCM 2012 R2

    Hi all,
    I'm wondering if it's possible to create report subscriptions with powershell ? This would save me a lot of time.
    Kind regards,
    J.M.

    If there was any it would be part of the SSRS PoSH cmdlets.  
    http://www.enhansoft.com/

Maybe you are looking for

  • Permissions window has no text, does not respond

    Whenever the permissions window pops up to verify my username and password, there is no text on it and (when I type in my username anyway) it will not accept the text, so nothing happens. I have gone through SYSTEM PREFERENCES to see if something loo

  • Media is not showing up on my wiki/blog server

    I have recently setup a server running 10.5 and running Podcast Producer. I have created a wiki/blog page and created several groups. I have attempted to use Podcast Capture to post videos, files and presentations to the webpage but the files never s

  • Portal System Object - ABAP User Type?

    Hi I've created a System Object, which will be used to connect to a NW '04 system. I'm using UIDPW as the Logon Method, and have defined the relevant user mappings. When I test the connection using a normal Dialog user in the ABAP backend, everything

  • A friend used my computer, and sync is set up with HER email, and I would like to delete that and put in my email address.

    I don't recall setting up sync acct. But am not computer savvy (can get by). Was checking out Sync and discovered that an acct is set up, but not with my email. My friend has used my computer, and I don't know if she meant to do it, but now acct. is

  • Outdated prerequisit when applying SAP Note

    Hi Experts, Ask a noob question here. When we apply SAP note, SAP may popup the window to download an outdated prerequisit. For example, when I apply note A on release 700, system may popup to let me download note B, whose fix has been included in re