Export (0) Print
Expand All

Update-WASJob

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Update-WASJob

Adds assets and assessments to a specified job.

Syntax

Parameter Set: AddAssessment
Update-WASJob [-Job] <WASJob[]> -Assessment <WASAssessment[]> [ <CommonParameters>]

Parameter Set: AddAsset
Update-WASJob [-Job] <WASJob[]> [-Computer] <WASComputer[]> [[-Image] <WASImage> ] [[-UnattendFile] <String> ] [-CustomImage] [ <CommonParameters>]




Detailed Description

The Update-WASJob cmdlet is used to add assessments, computers, and images to the job object in memory. After you add assets or assessments, you can invoke the job but you can't save it back to the Windows Assessment Services server.

The AddAssessment parameter set adds assessments. The AddAsset parameter set adds computers, images, and unattended answer files. However, you can’t combine these two parameter sets on the same command line.

The Job parameter is required, and either the Assessment or the Computer parameter is also required.

Parameters

-Assessment<WASAssessment[]>

Specifies a list of assessments to add the job. The assessments that are added use the recommended settings. If you create a custom assessment that does not include default assessment settings, the assessment could fail at run time.

To get a list of available assessments, use the Get-WASAssessment cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Computer<WASComputer[]>

Specifies a list of computer objects to add to the job. To get the computer object, use the Get-WASComputer cmdlet.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CustomImage

Specifies that a predefined image is applied to the computers being added to the job. This means that you use a deployment method other than Windows Assessment Services. The job holds the computer until the image is deployed to the computers.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Image<WASImage>

Specifies the image object to apply to the computers being added to the job. This means that you use Windows Assessment Services for deployment. To get the image object, use the Get-WASImage cmdlet.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Job<WASJob[]>

Specifies the job to update. This is a required parameter. To get the job object, use the Get-WASJob cmdlet. The job you update can't be saved to the Windows Assessment Services server.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-UnattendFile<String>

Specifies the unattended answer file to use when deploying the image to the computer. The string is the path to the unattend file stored in the /relax/unattendfiles share on the Windows Assessment Services server.


Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Add assessments to a job and then run it

 

The first command gets the job and saves it as a variable.


PS C:\> $job = Get-WASJob -JobName "Automated Job"

 

The second command gets the assessments and saves it as a variable.


PS C:\> $assessments = Get-WASAssessment -AssessmentName minifilter*

 

The third command adds the assessments to the job.


PS C:\> Update-WASJob -Job $job -Assessment $assessments

 

This command runs the job.


PS C:\> Invoke-WASJob -Job $job

Example 2: Add computers to a job and then run it

 

The first command gets the job and saves it as a variable.


PS C:\> $job = Get-WASJob -JobName "Automated Job"

 

The second command gets the computers and saves the objects as a variable.


PS C:\> $computers = Get-WASComputer -ComputerName *toast

 

The third command tells Windows Assessment Services that no image deployment is necessary.


PS C:\> $job.ApplyImage = $false

 

The fourth command adds the computers to the job.


PS C:\> Update-WASJob -Job $job -Computer $computers

 

This command runs the job.


PS C:\> Invoke-WASJob -Job $job

Example 3: Add computers and images to a job and then run it

 

The first command gets the job and saves it as a variable.


PS C:\> $job = Get-WASJob -JobName "Automated Job"

 

The second command gets the computers and saves the objects as a variable.


PS C:\> $computers = Get-WASComputer -ComputerName *toast

 

The third command gets the image and saves it as a variable.


PS C:\> $image = Get-WASImage -ImageName *Consumer*

 

The fourth command tells Windows Assessment Services to deploy the image to the computers.


PS C:\> $job.ApplyImage = $true

 

The fifth command adds the computers, and the image to the job.


PS C:\> Update-WASJob -Job $job -Computer $computers -Image $image

 

This command runs the job.


PS C:\> Invoke-WASJob -Job $job

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft