$error output question This topic contains 4 replies, has 4 voices, and was last updated by ertuu85 1 year, 3 months ago. Author Posts October 15, 2015 at 5:25 am #30860 ertuu85Participant PS C:\> $error Set-Acl : Attempted to perform an unauthorized operation. At line:1 char:8 + set-acl < <<< c:\test -AclObject $acl + CategoryInfo : PermissionDenied: (C:\test:String) [Set-Acl], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand Is there a way to have $errror just show 'Attempted to perform an unauthorized operation.' in this example? October 15, 2015 at 5:33 am #30861 Jonathan WarnkenParticipant Try $error.Exception October 15, 2015 at 5:35 am #30862 Rob SimmersParticipant I typically use: $error.Exception.Message October 15, 2015 at 5:36 am #30863 Dave WyattModerator Well, you could do $error.Exception.Message . If you just want to change the formatting of the ErrorRecord objects, that's a bit more involved. However, there is one easy solution that you might like: $ErrorView = 'CategoryView' October 15, 2015 at 5:47 am #30864 ertuu85Participant Damn you guys rock, thats perfect! Thanks all! Author Posts You must be logged in to reply to this topic.