Remove-SCGuestOSProfile
Menghapus objek profil sistem operasi tamu dari VMM.
Sintaks
Remove-SCGuestOSProfile
[-GuestOSProfile] <GuestOSProfile>
[-Force]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Cmdlet Remove-SCGuestOSProfile menghapus satu atau beberapa objek profil sistem operasi tamu dari pustaka VMM.
Cmdlet ini mengembalikan objek setelah berhasil (dengan properti MarkedForDeletion diatur ke True) atau mengembalikan pesan kesalahan setelah kegagalan.
Contoh
Contoh 1: Menghapus profil sistem operasi tamu tertentu dari pustaka
PS C:\> $OSProfile = Get-SCGuestOSProfile -Name "NewOSProfile01"
PS C:\> Remove-SCGuestOSProfile -GuestOSProfile $OSProfile -Confirm
Perintah pertama mendapatkan objek profil sistem operasi tamu bernama NewOSProfile01 dan menyimpan objek dalam variabel $OSProfile.
Perintah kedua menghapus profil sistem operasi tamu yang disimpan di $OSProfile, meminta konfirmasi sebelum menyelesaikan operasi.
Contoh 2: Hapus semua profil sistem operasi tanpa diminta untuk mengonfirmasi setiap penghapusan
PS C:\> $OSProfiles = Get-SCGuestOSProfile -VMMServer "VMMServer01.Contoso.com"
PS C:\> $OSProfiles | Remove-SCGuestOSProfile
Perintah pertama mendapatkan semua objek profil sistem operasi dari VMMServer01 dan menyimpan objek dalam array objek $OSProfiles.
Perintah kedua meneruskan setiap objek dalam $OSProfiles ke cmdlet Remove-OSProfile , yang menghapus setiap objek profil sistem operasi tamu dari pustaka VMM.
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 |
-Force
Memaksa perintah untuk berjalan tanpa meminta konfirmasi pengguna.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GuestOSProfile
Menentukan objek profil sistem operasi tamu.
Type: | GuestOSProfile |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
-PROTipID
Menentukan ID tip Performa dan Pengoptimalan Sumber Daya (pro tip) 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 |
Catatan
- Memerlukan objek profil sistem operasi tamu VMM, yang dapat diambil dengan menggunakan cmdlet Get-SCGuestOSProfile .