考虑:
PS Y:\> mkdir C:/dog
Directory: C:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 11/7/2013 10:59 PM dog
PS Y:\> mkdir C:/dog
New-Item : Item with specified name C:\dog already exists.
At line:38 char:24
+ $scriptCmd = {& <<<< $wrappedCmd -Type Directory @PSBoundParameters }
+ CategoryInfo : ResourceExists: (C:\dog:String) [New-Item], IOException
+ FullyQualifiedErrorId : DirectoryExist,Microsoft.PowerShell.Commands.NewItemCommand