mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-02-03 20:39:27 -05:00
15 lines
No EOL
433 B
PowerShell
15 lines
No EOL
433 B
PowerShell
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
Param(
|
|
[string]$hostname
|
|
)
|
|
|
|
$trustedHosts = (
|
|
Get-Item "wsman:\localhost\client\trustedhosts").Value.Replace(
|
|
$hostname, '')
|
|
$trustedHosts = $trustedHosts.Replace(",,","")
|
|
if($trustedHosts.EndsWith(",")){
|
|
$trustedHosts = $trustedHosts.Substring(0,$trustedHosts.length-1)
|
|
}
|
|
Set-Item "wsman:\localhost\client\trustedhosts" -Value $trustedHosts -Force |