powershell help please


C

capitan

Hi all. I'm trying to get recursive ntfs permissions exported to a csv
file for a specific share (s:\). I've tried the following command:

S:\>Get-ChildItem s:\ -recurse | Get-Acl | export-csv c:\Sperms.csv

The response I get for the command is below:

The system cannot find message text for message number 0x2331 in the
message file for Application.
The system cannot find message text for message number 0x8 in the
message file for System.

thanks
 
Ad

Advertisements

A

Andy Burns

capitan said:
I'm trying to get recursive ntfs permissions exported to a csv
file for a specific share (s:\). I've tried the following command:

S:\>Get-ChildItem s:\ -recurse | Get-Acl | export-csv c:\Sperms.csv
Looks like a permissions issue, fails for me as a non-admin user but
works if I use

Get-ChildItem C:\users\andy -recurse | Get-Acl | export-csv andy.csv

so either no permission to read permissions, or no permission to write
the CSV.
 
C

capitan

Looks like a permissions issue, fails for me as a non-admin user but
works if I use

Get-ChildItem C:\users\andy -recurse | Get-Acl | export-csv andy.csv

so either no permission to read permissions, or no permission to write
the CSV.
Hi andy, thanks for your reply. I moved the output of my script to a
subfolder of C:\ and made sure I was logged in as the domain admin, and
now the message I get is:

Get-ChildItem is not recognized as an internal or external command,
operable command or batch file

I did make sure powershell is installed on this machine. Any other
suggestions please?

Thanks.
 
A

Andy Burns

capitan said:
I moved the output of my script to a subfolder of C:\ and made sure I
was logged in as the domain admin, and now the message I get is:
Being logged in as domain admin doesn't mean you are running with admin
privileges
Get-ChildItem is not recognized as an internal or external command,
operable command or batch file
Try to run it from within the powershell ISE
 
Ad

Advertisements

P

Philip Herlihy

Hi all. I'm trying to get recursive ntfs permissions exported to a csv
file for a specific share (s:\). I've tried the following command:

S:\>Get-ChildItem s:\ -recurse | Get-Acl | export-csv c:\Sperms.csv

The response I get for the command is below:

The system cannot find message text for message number 0x2331 in the
message file for Application.
The system cannot find message text for message number 0x8 in the
message file for System.

thanks
It's admittedly a bit late to join in now, but it's worth investigating
the ICACLS command, which has the capability to export an ACL list (and
later reapply it).
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top