Solved

script to inventory OS on machines

Posted on 2013-11-05
5
250 Views
Last Modified: 2013-11-11
With XP end of life approaching soon I'm in need of a way to find out what machine has XP and what machine does not do I can reinstall or replace the  OS.   I only need the OS type and machine name.  I tried:

Set /p var= enter the computer file:

wmic /node:%var% os get CSName, Version, Caption> "C:\list.csv

but I'm getting RPC errors.  Is there a better way?
0
Comment
Question by:WellingtonIS
  • 4
5 Comments
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 39625579
You could put spiceworks on to inventory the entire network or Query AD for a list of OSs on the workstations.
0
 

Author Comment

by:WellingtonIS
ID: 39625583
No spiceworks too busy but thanks for that suggestion.
0
 

Author Comment

by:WellingtonIS
ID: 39625621
Trying Powershell

Get-ADComputer "OU=General_use_PC,OU=PCS,OU=Wel_Computers,OU=Wellington,OU=Acute Facilities,DC=Corp,DC=UHSINC,DC=Biz -Filter {OperatingSystem -NotLike "*server*"} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap -Auto

Now working either...
0
 

Accepted Solution

by:
WellingtonIS earned 0 total points
ID: 39627328
0
 

Author Closing Comment

by:WellingtonIS
ID: 39638264
Found this and it did the trick
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question