Solved

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

Posted on 2014-09-03
2
158 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Why would I want to create a function for tracking messages? I am glad you asked. As with most monotonous/routine tasks, human error tends to creep in after doing the same task over and over again. By creating a function, you load the function once…
Synchronize a new Active Directory domain with an existing Office 365 tenant
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 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

10 Experts available now in Live!

Get 1:1 Help Now