Write-Output "Starting"
$assemblyPath = "C:\Modules\Global\Azure\Compute\Microsoft.Exchange.WebServices.dll"
dir $assemblyPath
Write-Output "1"
Add-Type -Path $assemblyPath
Write-Output "2"
答案 0 :(得分:1)
要加载.dll
程序集,您可以参考以下步骤。
1。在门户网站->模块->添加模块中导航到您的自动化帐户,将Microsoft.ApplicationInsights.dll
文件压缩为Microsoft.ApplicationInsights.zip
,然后上传。上传后,您将在门户中找到它。
2。更改$assemblyPath
,完整的命令应如下所示,它将正常工作。
Write-Output "Starting"
$assemblyPath = "C:\Modules\User\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.dll"
dir $assemblyPath
Write-Output "1"
Add-Type -Path $assemblyPath
Write-Output "2"
输出: