PowerShell高级脚本错误处理与日志记录核心要点.pdfVIP

  • 5
  • 0
  • 约1.14千字
  • 约 9页
  • 2025-11-25 发布于北京
  • 举报

PowerShell高级脚本错误处理与日志记录核心要点.pdf

07|ErrorHandling

JeffreySnover|DistinguishedEngineerLeadArchitect

JasonHelmick|SeniorTechnologist,ConcentratedTechnology

ModuleOverview

1.ErrorActions-$ErrorActionPreference

2.Settingtheactionorvariable

3.UsingTry…Catch…Finally

4.AterExample

5.Loggingyourerrors

$ErrorActionPreference

•WheneveraPowerShellcommandencountersanon-

terminatingerror,itchecksabuild-invariable

$ErrorActionPreference.

–Continue–Thisisthedefault.Disyserrorandkeepsrunning.

–SilentlyContinue–Keepsrunningbut

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档