Help us understand the problem. What is going on with this article?

DataCore Installation Manager vSphere(DIM-V)をやり直す時

DIM-Vを最初からやり直したいときの環境の最低限のクリーンナップ(ロールバック)。

うちの環境専用

Connect-VIServer
#データセンターのカスタム属性を消す
Get-CustomAttribute | where Name -match DATACORE | Remove-CustomAttribute
#データコアサーバーをシャットダウンして削除
Get-VM | where Name -match "HVSAN" | Stop-VMGuest | Remove-VM -DeletePermanently
#iSCSIの動的検出、静的検出を全部削除
Get-VMHostHba -Type IScsi |Get-IScsiHbaTarget|Remove-IScsiHbaTarget
#iSCSI用VMKを削除
##関係ない"10.10.107.31"がいるのでこの環境固有の演算が入っています。
Get-VMHost | where Name -notmatch "10.10.107.31" | Get-VMHostNetwork | ForEach-Object{$_.VirtualNic} | where Name -ne "vmk0" | Remove-VMHostNetworkAdapter
#iSCSI用vSwitchを削除
Get-VirtualSwitch | Where-Object { ($_.VMHost -notmatch "10.10.107.31")  -and ($_.Name -notmatch "0")}|Remove-VirtualSwitch
Disconnect-VIServer

一般的な新規環境用

Connect-VIServer
#データセンターのカスタム属性を消す
Get-CustomAttribute | where Name -match DATACORE | Remove-CustomAttribute
#データコアサーバーをシャットダウンして削除
Get-VM | where Name -match "HVSAN" | Stop-VMGuest | Remove-VM -DeletePermanently
#iSCSIの動的検出、静的検出を全部削除
Get-VMHostHba -Type IScsi |Get-IScsiHbaTarget|Remove-IScsiHbaTarget
#iSCSI用VMKを削除
Get-VMHost | Get-VMHostNetwork | ForEach-Object{$_.VirtualNic} | where Name -ne "vmk0" | Remove-VMHostNetworkAdapter
#iSCSI用vSwitchを削除
Get-VirtualSwitch | where Name -notmatch "vSwitch0" |Remove-VirtualSwitch
Disconnect-VIServer
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした