refactor: implement centralized cache key management and add utility traits for vCenter SSH operations.
This commit is contained in:
@@ -5,6 +5,7 @@ param(
|
||||
|
||||
[string]$VMName,
|
||||
[string]$IP,
|
||||
[int]$MaskBits,
|
||||
[string]$Gateway,
|
||||
[string]$DNS,
|
||||
|
||||
@@ -43,7 +44,7 @@ try {
|
||||
# ✅ CHANGE IP (clean)
|
||||
$script = @"
|
||||
ip addr flush dev $iface
|
||||
ip addr add $IP/24 dev $iface
|
||||
ip addr add $IP/$MaskBits dev $iface
|
||||
ip route replace default via $Gateway
|
||||
echo "nameserver $DNS" > /etc/resolv.conf
|
||||
"@
|
||||
|
||||
Reference in New Issue
Block a user