Cnfan.net中国网络
IT网络技术专家
微软技术
 最新专题: Windows Server 2003 安全指南   IIS 技术专题   Exchange 2007 技术专题   SharePoint 2007 教程   跟我从头学WSH   专题 | 分类 | 投稿 | 搜索
 微软技术首页 | 微软动态 | Vista | Windows | ISA | Exchange | Share Point | SQL Server | System Center | 其它

PowerShell Write-error 帮助信息

简介:如下说明是翻译: help write-error 产生的帮助信息. 译者: Edengundam(马涛) Write-Error (1) 大纲 输出一个对象到错误管道(error pipeline). 语法 Write-Error [-message] <string> [-catego ...

关键字: PowerShell Write-error 帮助信息

如下说明是翻译: help write-error 产生的帮助信息.

译者: Edengundam(马涛)

 

Write-Error  (1)

 

大纲

输出一个对象到错误管道(error pipeline).

 

语法

Write-Error [-message] <string> [-category {<NotSpecified> | <OpenError> | <CloseError> | <DeviceError> | <DeadlockDetected> | <InvalidArgument> | <InvalidData> | <InvalidOperation> | <InvalidResult> | <InvalidType> | <MetadataError> | <NotImplemented> | <NotInstalled> | <ObjectNotFound> | <OperationStopped> | <OperationTimeout> | <SyntaxError> | <ParserError> | <PermissionDenied> | <ResourceBusy> | <ResourceExists> | <ResourceUnavailable> | <ReadError> | <WriteError> | <FromStdErr> | <SecurityError>}] [-errorId <string>] [-targetObject <Object>] [-recommendedAction <string>] [-categoryActivity <string>] [-categoryReason <string>] [-categoryTargetName <string>] [-categoryTargetType <string>] [<CommonParameters>]

 

Write-Error [-message] <string> -exception <Exception> [-category {<NotSpecified> | <OpenError> | <CloseError> | <DeviceError> | <DeadlockDetected> | <InvalidArgument> | <InvalidData> | <InvalidOperation> | <InvalidResult> | <InvalidType> | <MetadataError> | <NotImplemented> | <NotInstalled> | <ObjectNotFound> | <OperationStopped> | <OperationTimeout> | <SyntaxError> | <ParserError> | <PermissionDenied> | <ResourceBusy> | <ResourceExists> | <ResourceUnavailable> | <ReadError> | <WriteError> | <FromStdErr> | <SecurityError>}] [-errorId <string>] [-targetObject <Object>] [-recommendedAction <string>] [-categoryActivity <string>] [-categoryReason <string>] [-categoryTargetName <string>] [-categoryTargetType <string>] [<CommonParameters>]

 

Write-Error -errorRecord <ErrorRecord> [-recommendedAction <string>] [-categoryActivity <string>] [-categoryReason <string>] [-categoryTargetName <string>] [-categoryTargetType <string>] [<CommonParameters>]

 

详细描述

输出一个对象到错误管道(error pipeline). 使得你可以输出消息以及其他的信息, : id, 对象数据, 和遇到此信息后的建议办法.

 

参数

 

-message <string>

指定该错误的文本信息.

 

强制参数?

true

参数位置?

1

默认值

 

允许从管道绑定输入?  

true (传值)

允许通配符扩展

false

 

-category <ErrorCategory>

指定错误的类别.

 

如下列出了此参数可接受的值:

 

·         NotSpecified

·         OpenError

·         CloseError

·         DeviceError

·         DeadlockDetected

·         InvalidArgument

·         InvalidData

·         InvalidOperation

·         InvalidResult

·         InvalidType

·         MetadataError

·         NotImplemented

·         NotInstalled

·         ObjectNotFound

·         OperationStopped

·         OperationTimeout

·         SyntaxError

·         ParserError

·         PermissionDenied

·         ResourceBusy

·         ResourceExists

·         ResourceUnavailable

·         ReadError

·         WriteError

·         FromStdErr

·         SecurityError

 

强制参数?

false

参数位置?

named

默认值

 

允许从管道绑定输入?  

false

允许通配符扩展

false

 

-errorId <string>

指定一个与该错误关联的ID. 每个错误应该对应一个独特的字符串.

 

强制参数?

false

参数位置?

named

默认值

 

允许从管道绑定输入?  

false

允许通配符扩展

false

 

-targetObject <Object>

指定错误所关联的对象(译者注: 一般是引起该错误的对象).

 

强制参数?

false

参数位置?

named

默认值

 

允许从管道绑定输入?  

false

允许通配符扩展

false

[1] [2]

  <欢迎投稿>  <论坛讨论>
 »相关文章  »论坛新贴
精彩文章 活动资讯 今日头条