Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7615225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:35:34+00:00 2026-05-31T02:35:34+00:00

$Computers = Get-QADComputer -sizelimit 5 returns a list of five computers. I loop with

  • 0
$Computers = Get-QADComputer -sizelimit 5

returns a list of five computers. I loop with

foreach($computer in $computers) {
echo "and then I can do this $computer.name"

to get only the computername from $computers.
But When i try to pass it to start-job like this:

    Start-Job -FilePath $ScriptFile -Name $Computer.Name -ArgumentList $Computer

I am unable to do a $computer.name inside $scriptfile. I have to pass it like $computer.name and call it like $args[0]. But then I loose all the other properties (I am using a bunch inside $scriptfile.)

What am I not getting here? What would you call $computer? And what would you call $computer.name ?

Sune:)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:35:35+00:00Added an answer on May 31, 2026 at 2:35 am

    You should be able to get the Name property with $args[0].Name. If you want to access the name parameter like so: $computer.name, then you need to define a parameter in $ScriptFile:

    param(
       $Computer
    )
    
    $Computer.name
    

    By the way’ you can’t do this:

    echo "and then I can do this $computer.name"
    

    PowerShell expands the value $computer only. Put it in a sub-expression:

    echo "and then I can do this $($computer.name)"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The way we get my.computer.name, can we also get the name of all computers
In a .NET Windows service (C#), how can I get the computer name? Is
Can't get my head around this... I have 3 tables like this: Computers ---------
I am trying to get a list of local network computers. I tried to
Basically I want to make sure I will always get the computer's name rather
how to get network connection list in my computer with c# vpn list or
how do you get the list of all the computer names/ip address on your
I need to get a list of directories shared by the current computer, and
I have performed an LDAP:// query to get a list of computers within a
I want to get list which computers are online or offline on local network

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.