Bagikan melalui


Get-SCScriptCommand

Mendapatkan semua perintah skrip untuk profil aplikasi, penyebaran aplikasi, atau profil host.

Sintaks

Get-SCScriptCommand
   -ApplicationProfile <ApplicationProfile>
   [-VMMServer <ServerConnection>]
   [<CommonParameters>]
Get-SCScriptCommand
   -ApplicationDeployment <ApplicationDeployment>
   [-VMMServer <ServerConnection>]
   [<CommonParameters>]
Get-SCScriptCommand
   -PhysicalComputerProfile <PhysicalComputerProfile>
   [-VMMServer <ServerConnection>]
   [<CommonParameters>]

Deskripsi

Cmdlet Get-SCScriptCommand mendapatkan semua perintah skrip untuk profil aplikasi, penyebaran aplikasi, atau profil host.

Contoh

Contoh 1: Mendapatkan semua perintah skrip yang terkait dengan profil aplikasi

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationProfile $AppProfile
PS C:\> $ScriptCommand

Perintah pertama mendapatkan objek profil aplikasi bernama SvcWebAppProfile01 dan menyimpan objek dalam variabel $AppProfile.

Perintah kedua mendapatkan semua perintah skrip untuk objek profil aplikasi yang disimpan di $AppProfile dan menyimpan objek dalam array $ScriptCommand.

Perintah terakhir menampilkan informasi tentang semua objek perintah skrip yang disimpan dalam array $ScriptCommand kepada pengguna.

Contoh 2: Mendapatkan semua perintah skrip yang terkait dengan penyebaran aplikasi

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfile
PS C:\> $ScriptCommand = Get-SCScriptCommand -ApplicationDeployment $AppDeployment

Perintah pertama mendapatkan objek profil aplikasi bernama SvcWebAppProfile01 dan menyimpan objek dalam variabel $AppProfile.

Perintah kedua mendapatkan objek penyebaran aplikasi untuk profil aplikasi yang disimpan di $AppProfile dan menyimpan objek dalam variabel $AppDeployment.

Perintah terakhir mendapatkan semua perintah skrip yang terkait dengan objek penyebaran aplikasi yang disimpan di $AppDeployment dan menyimpan perintah skrip di $ScriptCommand.

Parameter

-ApplicationDeployment

Menentukan objek penyebaran aplikasi.

Type:ApplicationDeployment
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ApplicationProfile

Menentukan objek profil aplikasi.

Type:ApplicationProfile
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PhysicalComputerProfile

Menentukan profil yang digunakan untuk menyebarkan sistem operasi ke komputer.

Type:PhysicalComputerProfile
Aliases:VMHostProfile
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Menentukan objek server VMM.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Output

ScriptCommand

Cmdlet ini mengembalikan objek ScriptCommand .