Remove-SilVMHost
Removes hosts from the Software Inventory Logging Aggregator database.
語法
Parameter Set: Default
Remove-SilVMHost [-EndTime <DateTime> ] [-Force] [-StartTime <DateTime> ] [-VMHostName <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細描述
The Remove-SilVMHost cmdlet removes host names from the Software Inventory Logging Aggregator database and deletes host credentials from Credential Manager.
參數
-EndTime<DateTime>
Specifies the polling end date and time. This cmdlet purges the active list of hosts based on the value that this parameter specifies.
別名 |
none |
必要項? |
false |
位置? |
named |
預設值 |
none |
接受管線輸入? |
false |
接受萬用字元? |
false |
-Force
強制執行命令,不要求使用者確認。
別名 |
none |
必要項? |
false |
位置? |
named |
預設值 |
none |
接受管線輸入? |
false |
接受萬用字元? |
false |
-StartTime<DateTime>
Specifies the polling start date and time. This cmdlet purges the active list of hosts based on the value that this parameter specifies.
別名 |
none |
必要項? |
false |
位置? |
named |
預設值 |
none |
接受管線輸入? |
false |
接受萬用字元? |
false |
-VMHostName<String[]>
Specifies an array of virtual machine host names to remove.
別名 |
none |
必要項? |
false |
位置? |
named |
預設值 |
none |
接受管線輸入? |
true(ByValue) |
接受萬用字元? |
false |
-Confirm
在執行指令程式之前提示您確認。
必要項? |
false |
位置? |
named |
預設值 |
false |
接受管線輸入? |
false |
接受萬用字元? |
false |
-WhatIf
示範當執行指令程式時會發生什麼事情。此指令程式並未執行。
必要項? |
false |
位置? |
named |
預設值 |
false |
接受管線輸入? |
false |
接受萬用字元? |
false |
<CommonParameters>
這個指令程式支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。如需詳細資訊,請參閱 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
輸入
輸入類型是可透過管道傳送至指令程式的物件類型。
輸出
輸出類型是指令程式所發出的物件類型。
範例
Example 1: Remove hosts and delete credentials
This command removes the host names Host01 and Host02 from the Software Inventory Logging Aggregator database and deletes the host credentials from Credential Manager.
PS C:\> Remove-SilVMHost -VMHostName "Host01","Host02"
Example 2: Remove hosts and delete credentials without confirmation
This command removes the host names Host01 and Host02 from the Software Inventory Logging Aggregator database and deletes the host credentials from Credential Manager. This command specifies the Force parameter. The cmdlet does not prompt you for confirmation.
PS C:\> Remove-SilVMHost -VMHostName "Host01","Host02" -Force
Example 3: Remove hosts after a specified time
This command removes the host names from the database after the specified date and time.
PS C:\> Remove-SilVMHost -StartTime "12/29/2014 11:00 AM"
Example 4: Remove hosts before a specified time
This command removes the host names from the database before the specified date and time.
PS C:\> Remove-SilVMHost -EndTime "12/29/2014 11:00 AM"
Example 5: Remove hosts that match a wildcard and delete credentials
This command removes host names that match the wildcard string a* from the database and deletes the host credentials from Credential Manager.
PS C:\> Remove-SilVMHost -VMHostName "a*"