Visar inlägg med etikett powershell. Visa alla inlägg
Visar inlägg med etikett powershell. Visa alla inlägg

tisdag 9 december 2008

get computer models from wsus

if you want to get data from wsus that the built in reporting tools doesn't support you can use the powerpack for powergui to get basically anything you want that is in wsus internal database.

  1. download and install powergui
  2. download and extract wsus powerpack
  3. (you also have to have the wsus administration tools installed on your workstation.)
open up powergui and add the powerpack by rightclicking the top PowerGUI node and choose import. point to the location where you unpacked the wsus powerpack and click open.


now you can browse around the wsus-tree in powergui and do some really nice stuff. for example, list all the computer models in your network (click Computers > Get-ComputerTargets) and export them to a csv file.

torsdag 4 september 2008

dagens powershell oneliner

task: dra ut alla datornamn som står i en textfil och fråga AD efter description.

börja med att tanka Quests ljuvliga, gratis powershell cmdlets här.


sen:
get-content datorer.txt | get-qadcomputer | select-object name, description

då får man en två fina kolumner i sitt powershell-fönster.

vill man ha ut det i csv så outputar man till export-csv på slutet:
get-content datorer.txt | get-qadcomputer | select-object name, description | export-csv output.csv