none
Powershell creating new properties RRS feed

  • Question

  • Hello Anyone willing to help.

    I'm learning PowerShell and  wondering why the following command does not populate the new computername field with the computer name?

    get-adcomputer -filter * |  select *,@{n='computername';e={$.name}}

    DistinguishedName  : sorry cannot post that
                         rp
    DNSHostName        : PK******   ---> sorry cannot post dns name
    Enabled            : True
    Name               : lew9739_Server1
    ObjectClass        : computer
    ObjectGUID         : sorry. cannot post
    SamAccountName     : lew9739_Server1
    SID                : cannot post
    UserPrincipalName  :
    PropertyNames      : {DistinguishedName, DNSHostName, Enabled, Name...}
    AddedProperties    : {}
    RemovedProperties  : {}
    ModifiedProperties : {}
    PropertyCount      : 9
    computername       :   this field is blank?? in the PowerShell Month of Lunches book and online companion videos' it works

    • Moved by Stanly Fan Thursday, June 29, 2017 9:15 AM from windows form general
    Friday, June 23, 2017 9:25 PM

All replies