Solved

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

Posted on 2014-09-03
2
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

738 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