【发布时间】:2016-10-28 06:10:26
【问题描述】:
谁能帮我解决以下问题。
###############################
# retrieve Rule Definitions
###############################
AGTrace ""
AGTrace "====================================="
AGTrace "Retrieving AGTL Rule Definitions"
AGTrace "====================================="
#remove read-only flag on local rule definitions
try {
Get-ChildItem "$LocalPath\ruledefinitions" | Set-ItemProperty -name IsReadOnly -value $false
} catch {
Write-host "Unable to clear read-only flag"
Write-host $error[0].exception.message
}
Copy-Files -SourceFolder "$AGSource\AGTL\RuleDefinitions" -DestFolder "$LocalPath\ruledefinitions"
AGTrace ""
AGTrace "====================================="
AGTrace "Retrieving $AGID Rule Definitions"
AGTrace "====================================="
if (test-path "$AGSource\$AGID\RuleDefinitions") {
AGTrace "Rule Definitions exist for $AGID"
Copy-Files -SourceFolder "$AGSource\$AGID\RuleDefinitions" -DestFolder "$LocalPath\ruledefinitions"
} else {
AGTrace "No Rule Definitions exist for $AGID"
}
消息以用户身份执行:abc\ankq_adc_AGd_extr。设置项目属性: 属性 System.Boolean IsReadOnly=False 不存在或不存在 成立。在 E:\AGD4.0.1\Full\DW-Extractor\AGDiagnostics_R4.0.1_CoreInstall\AG4STG_4.0.0\execute_load_JP.ps1:145 char:47 + Get-ChildItem "$LocalPath\SupplementalAGta" | Set-ItemProperty -name IsReadOnly ... +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ReadError: (System.Boolean IsReadOnly=False:PSNoteProperty) [Set-ItemProperty],IOException + FullyQualifiedErrorId : SetPropertyError,Microsoft.PowerShell.Commands.SetItemPropertyCommand。 处理退出代码 1。该步骤失败。
【问题讨论】:
标签: powershell sql-server-2014