Update-WASJob

Update-WASJob

Adds assets and assessments to a specified job.

구문

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>]

자세한 설명

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 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.

매개 변수

-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.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Computer<WASComputer[]>

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

별칭

없음

필수 여부

true

위치

2

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

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 . The job holds the computer until the image is deployed to the computers.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Image<WASImage>

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

별칭

없음

필수 여부

false

위치

3

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

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 server.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

true (ByValue)

와일드카드 문자 허용 여부

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 server.

별칭

없음

필수 여부

false

위치

4

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

예제

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 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 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

관련 항목

Get-WASAssessment

Get-WASComputer

Get-WASImage

Get-WASJob

Windows Assessment Services Technical Reference