/build/static/layout/Breadcrumb_cap_w.png

[Report] All computers with a smartcard reader

Hi everyone, and sorry for my bad english :)

Recently i developed a method that extract all the pc in K1000 inventory that has a smart card reader and i've published it on GitHub.
We use a script, a custom invetory rule and finally we generate the report. 

How it works

  1. The vbs script executes a WMI query over the target device(s) and saves an output file named smartcard.txt (see below in the Setup section)
  2. The vbs script is scheduled and deployed to the target device(s) via K1000 Online KScript
  3. A K1000 Custom Inventory Rule reads the output file for every inventoried device and stores the information in the database
  4. A scheduled Report (choose your favorite format between HTML, CSV, PDF or Excel) returns only PCs with a smart card reader installed

Setup

The KScript

  1. Edit the script line 4 with the path where you want to save the output file. In our environment every PC has a “C:\Tools”directory for service purpose, so I decided to save the output there.
Set f = log.CreateTextFile("C:\Tools\smartcard.txt", 2)
  1. Go to your K1000 Dashboard, then go to Scripting and create a New Script (Choose Action / New)

  2. Name the script as your wish (for example: Check Smart Card Reader) and follow these steps:

Script Basic Settings

  • Type: Online KScript
  • Enabled: Yes
  • Deploy: one or some devices, all devices or to a Device Label, according to your needs in your environment
  • Windows Run As: Local System
  • Upload the smartcard.vbs as New Dependecy

Tasks

We want the script to run once in every PC, so we'll use a “checkmark” (the smartcard.txt) to verify that...

  • Verify: Verify a file exists...
    • C:\Tools\smartcard.txt
  • Remediation: Launch a program...
    • Directory: $(KACE_SYS_DIR)
    • File: cscript.exe $(KACE_DEPENDENCY_DIR)\smartcard.vbs
    • Wait for completion: Yes
  • On Remediation Success: Upload a file... (note: this step is not necessary and only for archiving purpose)
    • Directory: C:\Tools
    • File: smartcard.txt

...and Save your brand new script.

cIpcrH.png

The Custom Inventory Rule

  1. In the K100 Dashboard, now go to Inventory section, then go to Software and create a new Software entry (Choose Action / New)

  2. Name the rule as your wish (for example: IT Dep — Check Smart Card Reader) and follow these steps:

  • Publisher: IT Department (it's useful for further searches into the Software Inventory)
  • Supported Operating Systems: All the Windows OSs in your Inventory
  • Custom Inventory Rule: ShellCommandTextReturn(cmd /c type C:\Tools\smartcard.txt)

...and Save your new Custom Inventory Rule.

Rqposa.png

Now we need all our devices complete their inventory. The new Custom Inventory Rule creates a new entry in every device record managed by the K1000.

If a smart card reader has been discovered we'll have at least one “DeviceClass: SMARTCARDREADER” text iside the Custom Inventory Fields section into every device record in Inventory / Devices

Screenhot 3

Otherwise, if a smart card reader has not been discovered, we'll have no text

When all your devices has been inventoried and you're ready, jump to the next section

The Report

In the K100 Dashboard, now go to Reporting section, then in Reports and create a new Report (Choose Action / New)

Name the Report as your wish (for example: PCs with Smart Card Reader) and follow these steps:

Title and Topic

  • Category: Inventory
  • Topic: Device

Fields to Display

  • Device: System Name
  • Operating System Info: Name
  • User Information: User Name
  • Manufacturer and BIOS: System Model

Feel free to add and modify any other field, according to your needings.

Filters

Delete the default filter and create this:

Filter

Save your new report and try it.



Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ