Remove-SCCustomPropertyValue
Menghapus nilai dari properti kustom.
Sintaks
Remove-SCCustomPropertyValue
-CustomPropertyValue <CustomPropertyValue>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Remove-SCCustomPropertyValue
-CustomProperty <CustomProperty>
-JobGroup <Guid>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Deskripsi
Cmdlet Remove-SCCustomPropertyValue menghapus nilai dari properti kustom.
Contoh
Contoh 1: Menghapus nilai properti kustom dari komputer virtual
PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> $CustomProp = Get-SCCustomProperty -Name "Cost Center"
PS C:\> $CustomPropValue = Get-SCCustomPropertyValue -InputObject $VM -CustomProperty $CustomProp
PS C:\> Remove-SCCustomPropertyValue -CustomPropertyValue $CustomPropValue
Perintah pertama mendapatkan objek komputer virtual bernama VM01 dan menyimpan objek dalam variabel $VM.
Perintah kedua mendapatkan objek properti kustom bernama Pusat Biaya dan menyimpan objek dalam variabel $CustomProp.
Perintah ketiga mengambil nilai untuk properti kustom yang disimpan di $CustomProp (Pusat Biaya) untuk komputer virtual yang disimpan di $VM (VM01) dan menyimpan nilai dalam variabel $CustomPropValue.
Perintah terakhir menghapus nilai properti kustom yang disimpan di $CustomPropValue.
Parameter
-Confirm
Meminta Anda mengonfirmasi sebelum menjalankan cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CustomProperty
Menentukan objek properti kustom.
Type: | CustomProperty |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CustomPropertyValue
Menentukan objek nilai properti kustom.
Type: | CustomPropertyValue |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-JobGroup
Menentukan pengidentifikasi untuk serangkaian perintah yang akan berjalan sebagai set tepat sebelum perintah akhir yang menyertakan pengidentifikasi grup pekerjaan yang sama berjalan.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
Menentukan bahwa kemajuan pekerjaan dilacak dan disimpan dalam variabel yang dinamai oleh parameter ini.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
Menentukan nama pengguna. Cmdlet ini beroperasi atas nama pengguna yang ditentukan parameter ini.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
Menentukan peran pengguna. Untuk mendapatkan peran pengguna, gunakan cmdlet Get-SCUserRole . Cmdlet ini beroperasi atas nama peran pengguna yang ditentukan parameter ini.
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
Menentukan ID tip Performa dan Pengoptimalan Sumber Daya (tip PRO) yang memicu tindakan ini. Parameter ini memungkinkan Anda mengaudit tips PRO.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
Menunjukkan bahwa pekerjaan berjalan secara asinkron sehingga kontrol segera kembali ke shell perintah.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Menunjukkan apa yang akan terjadi jika cmdlet berjalan. Cmdlet tidak dijalankan.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |