Windows Vista Forums

quest cmdlet : get-qadcomputer
  1. #1


    IT Staff Guest

    quest cmdlet : get-qadcomputer

    i m trying to retrieve computer objects that is NOT server OS. That is
    results shld be windows 2000 prof, xp, vista, etc

    get-qadcomputer -sizelimit 0 | where {$_.osname -ne '*server*'} | select
    osname, osservicepack.




    Somehow it does not work. i suspect it has something to do with $_osname ?




      My System SpecsSystem Spec

  2. #2


    Shay Levy [MVP] Guest

    Re: quest cmdlet : get-qadcomputer

    Hi IT,

    Replace -ne with -notlike


    Or better, use ldap filter:

    get-qadcomputer -sizelimit 0 -ldap '(!operatingSystem=*server*)' | select
    name,osname, osservicepack


    ---
    Shay Levy
    Windows PowerShell MVP
    http://blogs.microsoft.co.il/blogs/ScriptFanatic



    IS> i m trying to retrieve computer objects that is NOT server OS. That
    IS> is results shld be windows 2000 prof, xp, vista, etc
    IS>
    IS> get-qadcomputer -sizelimit 0 | where {$_.osname -ne '*server*'} |
    IS> select osname, osservicepack.
    IS>
    IS> Somehow it does not work. i suspect it has something to do with
    IS> $_osname ?
    IS>



      My System SpecsSystem Spec

quest cmdlet : get-qadcomputer problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quest AD Cmdlet as part of a script Jobbsy PowerShell 1 20 Feb 2009
Quest AD cmdlet -what is the cmdlet to remove computer object IT Staff PowerShell 2 30 Oct 2008
Get-QADComputer KeithK PowerShell 2 18 Jul 2008
Invoking Cmdlet Get-Location from cmdlet,cant get Currnt Directory Vikram PowerShell 2 05 Jun 2008
need help with Get-QADComputer Ben Christian PowerShell 2 19 Mar 2008