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>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
例
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