It`s simple when you know how ! Operating Systems,Tutorials,Windows How to return one value from a PowerShell select property

How to return one value from a PowerShell select property

 

 

When running select from powershell the result will be headers and value, if you what just the value you should use -ExpandProperty switch, for example

if you want to get just the username of file owner on c:\1.txt :

$usr = GET-ACL C:\1.txt | select -exp owner
echo $usr

This will return :  coputername\username

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

You cannot access a mailbox After Disable and Enable The Mailbox ERROR Unable to open message store. (hr=0x80004005, ec=2412)You cannot access a mailbox After Disable and Enable The Mailbox ERROR Unable to open message store. (hr=0x80004005, ec=2412)

Some time after disable a mailbox and enable it again it remain disabled and in owa you can get the error : [Microsoft.Mapi.MapiExceptionMailboxDisabled]: MapiExceptionMailboxDisabled: Unable to open message store. (hr=0x80004005,