exécution à distance pour le réglage physicalPath
est erroring avec le message suivant:Set-ItemProperty physicalPath
Impossible de trouver le lecteur. Un lecteur portant le nom "IIS" n'existe pas.
Quel est le problème avec ce qui suit?
$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, merci. –