hey*_*ega 4 iis powershell mime
我有以下命令将添加MIME类型IIS使用PowerShell
add-webconfigurationproperty //staticContent -name collection -value @{fileExtension='.xpa'; mimeType='application/octet-stream'}
Run Code Online (Sandbox Code Playgroud)
如何在调用前首先检查MIME类型是否存在add-webconfigurationproperty?
您可以检查以下内容:
if( !((Get-WebConfiguration //staticcontent).collection | ? {$_.fileextension -eq '.xpa'}) ) {
#do something
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4073 次 |
| 最近记录: |