This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

List filtered for REAL computers only

Hello,

I know ServicePrincipalName is a property of object class Computer

but i need to get all names in Active Directory which are real servers/desktops

Get-QADComputer -IncludeAllProperties | export-csv "mycomputer.txt"

but the shares, the cluster names, etc... are listed ... I don't want them on the list...

in another meaning how to differentiate:

- Server Names (Desktop Names)

- Share Names

- Cluster Names

- SQL Instance Names

Any idea?
Thanks,
Dom

  • How about something like this:

    Get-QADComputer -includeallproperties | where {$_.operatingsystem -like "windows*"} | export-csv "mycomputers.txt" -notypeinformation
  • Good Morning,

    I tried this but I got an error:
    [PS] H:\>Get-QADComputer -includeallproperties | where {$_.operatingsystem -like "windows*"} | export-csv "mycomputers.t
    xt" -notypeinformation
    Get-QADComputer : An operation error occurred.
    At line:1 char:16
    + Get-QADComputer <<<< -includeallproperties | where {$_.operatingsystem -like "windows*"} | export-csv "mycomputers.t
    xt" -notypeinformation
    + CategoryInfo : NotSpecified: (:) [Get-QADComputer], DirectoryAccessException
    + FullyQualifiedErrorId : Quest.ActiveRoles.ArsPowerShellSnapIn.DirectoryAccess.DirectoryAccessException,Quest.ActiveRoles.ArsPowerShellSnapIn.Powershell.Cmdlets.GetComputerCmdlet

    Any idea?
    Thanks,
    Dom
  • Weird...there's nothing exotic about this call. The only thing we did was add some filtering to the output pipeline. There is nothing "new" on the access-to-AD side of the equation.

    Maybe reboot your host and try again?
  • I rebooted the machine and tried to use various accounts which are local administrators, and have access to quest as administrators but still having the same issue
  • could it be an access violation to quest? to Active Directory?