Iis 当我';我在运行PowerShell
当我运行这个PowerShell脚本时Iis 当我';我在运行PowerShell,iis,powershell-4.0,Iis,Powershell 4.0,当我运行这个PowerShell脚本时 Import-Module WebAdministration $path1 = Get-ItemProperty -PSPath IIS:\Sites\CompassSvcQA-Red\R4\CompassSettings Set-Location "C:\Windows\Microsoft.NET\Framework\v4.0.30319" .\aspnet_regiis.exe -pef "connectionStrings" $path1.phy
Import-Module WebAdministration
$path1 = Get-ItemProperty -PSPath IIS:\Sites\CompassSvcQA-Red\R4\CompassSettings
Set-Location "C:\Windows\Microsoft.NET\Framework\v4.0.30319"
.\aspnet_regiis.exe -pef "connectionStrings" $path1.physicalPath -prov "DataProtectionConfigurationProvider"
我得到了这个错误:
Get-ItemProperty:找不到驱动器。名为“IIS”的驱动器不可用
不存在。第2行字符:10
+$path1=获取项目属性-PSPath IIS:\Sites\CompassSvcQA Red\R4\CompassSettings
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CategoryInfo:ObjectNotFound:(IIS:String)[Get-ItemProperty],DriveNotFoundException
+FullyQualifiedErrorId:DriveNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
可能的副本。该模块是否实际安装在您的计算机上?我的web.config文件有不同的名称(比如settings.config),但aspnet_regiis.exe只能从web.config加密或解密,因此如何使其从重命名的web.config(settings.config)加密