1
設置physicalPath
遠程執行以下消息示數:的Set-ItemProperty physicalPath
找不到驅動。名稱爲「IIS」的驅動器不存在。
以下哪項有問題?
$site = Read-Host "What is the name of the virtual?"
$newpath = Read-Host "What is the NEW PATH of the new site?"
$ScriptBlockContent = {
$site = $args[0],
$newpath = $args[0]
(Set-ItemProperty -Path IIS:\\Sites\ABC_LIVE\$site -Name "physicalPath" -Value "$newpath")
}
# Add the IIS PowerShell Module
Import-Module WebAdministration
Invoke-Command -ComputerName DEVSERVERNAME -ScriptBlock $ScriptBlockContent -ArgumentList $site,$newpath
Ahhhhhh,謝謝。 –