... Home  
... Impressum
... ColorConsole

... CMD
... Netsh-XP
... Netsh-7
... Netsh-Vista
... Powershell

Download the Windows 7 Starter, Home (Basic Premium), Professional und Ultimate!


... facebook.de
 
 
ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.

C:\Windows-7>Powershell get-help Write-Error -full

# NAME
Write-Error

# SYNOPSIS
Writes an object to the error stream.

# SYNTAX
Write-Error -ErrorRecord <ErrorRecord> [-CategoryActivity <string>] [-CategoryReason <string>] [-CategoryTargetName <string>] [-CategoryTargetType <string>] [-RecommendedAction <string>] [<CommonParameters>]

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>] [-CategoryActivity <string>] [-CategoryReason <string>] [-CategoryTargetName <string>] [-CategoryTargetType <string>] [-RecommendedAction <string>] [<CommonParameters>]

Write-Error -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>] [-Message <string>] [-TargetObject <Object>] [-CategoryActivity <string>] [-CategoryReason <string>] [-CategoryTargetName <string>] [-CategoryTargetType <string>] [-RecommendedAction <string>] [<CommonParameters>]

# DESCRIPTION
The Write-Error cmdlet writes an error to the Windows PowerShell error stream. By default, errors are sent to the host program to be displayed, along with output.

You can write an error by submitting an error message string, an ErrorRecord object, or an Exception object. Use the other parameters of Write-Error to populate the error record.

# PARAMETERS
-Category <ErrorCategory>
Specifies the category of the error. The default value is NotSpecified.

For information about the error categories, see "ErrorCategory Enumeration" in the MSDN (Microsoft Developer Network) library at http://go.microsoft.com/fwlink/?LinkId=143600.

Required? false
Position? named
Default value NotSpecified
Accept pipeline input? false
Accept wildcard characters? false

-CategoryActivity <string>
Describes the action that caused the error.

Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-CategoryReason <string>
Explains how or why the activity caused the error.

Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-CategoryTargetName <string>
Specifies the name of the object that was being processed when the error occurred.

Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-CategoryTargetType <string>
Specifies the .NET type of the object that was being processed when the error occurred.

Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-ErrorId <string>
Specifies an ID string to identify the error. The string should be unique to the error.

Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-ErrorRecord <ErrorRecord>
Specifies an error record object that includes properties that describe the error.

To get an error record object, use the New-Object cmdlet or take an error record object from the array in the $Error automatic variable.

Required? true
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-Exception <Exception>
Specifies an exception that represents the error.

You can use an exception instead of specifying message text or an exception record.

Required? true
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-Message <string>
Specifies the message text of the error. If the text includes spaces or special characters, enclose it in quotation marks. You can also pipe a message string to Write-Error.

Required? true
Position? 1
Default value None
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-RecommendedAction <string>
Describes the action that the user should take to resolve or prevent the error.

Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

-TargetObject <Object>
Specifies the object that was being processed when the error occurred. Enter the object (such as a string), a variable that contains the object, or a command that gets the object.

Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
System.String
You can pipe a string that contains an error message to Write-Error.

# OUTPUTS
Error object
Write-Error writes only to the error stream. It does not return any objects.

# NOTES

# EXAMPLE 1

C:\PS>get-childitem | foreach-object { if ($_.gettype().tostring() -eq "Microsoft.Win32.RegistryKey") {write-error "Out-of-band object" -errorID B1 -targetobject $_ } else {$_ } }

# Description
-----------
This command writes an error when the Get-ChildItem cmdlet returns a Microsoft.Win32.RegistryKey object, such as the objects in the HKLM: or HKCU drives of the Windows PowerShell Registry provider.

# EXAMPLE 2

C:\PS>write-error "Access denied."

# Description
-----------
This command writes an "Access denied" error. The command uses the Message parameter to specify the message, but omits the optional Message parameter name.

# EXAMPLE 3

C:\PS>write-error -message "Error: Too many input values." -category InvalidArgument

# Description
-----------
This command writes a error and specifies an error category.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113425
Write-Debug
Write-Verbose
Write-Output
Write-Host
Write-Progress
Write-Warning

C:\Windows>powershell get-help Write-Output -full

OS: Windows-7 / Windows-Vista // Windows Server 2008
»»»» ColorConsole


0.109
dead/paralysed/stuck pixels on LCD monitors  / Ich will Q-Dir öffen, mit bestimmten Einstellungen, von der Taskleiste aus!  / Kann man in Win-7 auch weitere Windows Komponenten hinzufügen, bzw. entfernen?  / Kann DesktopOK die Bildschirmauflösung beider Bildschirme in der Überschrift verwenden?  / Wie kann ich die Spalteneinstellungen übertragen?  / Windows 7 Testversion Einschränkung?  / Ist Windows 7 besser als Windows Vista?  / Die Desktop-Lupe hat bei Windows-Vista und Dual-Monitor ein Problem?  / / Lesetipp: 608  / Die Windows-7 Dateizuordnungen bei Dateiendungen für Standardprogramme festlegen?  / Wie kann ich die Spalten für den Ordnerausaudruck speichern,bzw laden  / FaceBook.de facebook.de  / Die Ordnergrösse in einer Spalte anzeigen lassen, geht das?  / Was ist, wenn der Window-7 Aktivierungszeitraum abgelaufen ist?  / Wie kann ich verhindern dass Q-Dir *. zip, *. rar, *. cab Ordner öffnet?  /