Solved

powershell v2 doesn't respond to <f> keys, and doesn't recognize some parameter names

Posted on 2014-09-03
2
164 Views
Last Modified: 2014-09-18
I'm trying to get a list of permissions on all subdirectories and files, and output that permissions list to a file

I use     Get-Acl          by itself and see what I want on the screen, except that it is truncated to screen width.



       How would you get around this truncation? What I tried below didn't work



To get by the truncation, I figure I'll send it to a file and see if that helps

However, I never get that far; I try to add the out-file parameter and get errors

PS U:\> get-acl out-file -filepath List3
Get-Acl : A parameter cannot be found that matches parameter name 'filepath'.



Also, FYI,  the <f> keys don't work. I press <f7> and get nothing. What's up with that? I recall it used to work.


Thanks



FYI, My data:

PS U:\> $PSVersionTable.PSVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

I started PS with <Run as Administrator>

Windows 7 Pro SP1  32 bit
0
Comment
Question by:cgunix
2 Comments
 
LVL 39

Assisted Solution

by:footech
footech earned 250 total points
ID: 40301692
You would need  a pipe character for your command to work.
get-acl | out-file -filepath List3
However, that won't change the output here.
Here's a couple simple options for you.
get-acl | ft -auto -wrap
get-acl | fl
0
 
LVL 40

Accepted Solution

by:
Subsun earned 250 total points
ID: 40301699
If you are trying to export the permission details to output file then you can use the following code. You actually need to pipe the results of Get-ACL command to the Export-csv  (to export the result to csv file) or out-file command..
Get-acl C:\windows | Export-Csv C:\temp\report.csv -nti

Open in new window

Or
Get-Acl C:\windows | FL | Out-File c:\temp\report.txt

Open in new window

To show complete details to screen..
Get-Acl C:\windows | FT -auto -Wrap

Open in new window


And if I am not wrong, F7 - just list the history of commands you have already typed in. This is not a particular function for PowerShell. You will get the command history even in cmd console.

If you need an example for exporting permission details using Get-Acl, then refer the following question..
http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_28230936.html
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
Set OWA language and time zone in Exchange for individuals, all users or per database.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now