Re: Changing File System Permissions and Ownership in Powershell

Discussion in 'Scripting' started by Joe Acosta, Oct 21, 2008.

  1. Joe Acosta

    Joe Acosta Guest

    David,

    From a regular shell (not power shell), type xcacls /? and see if the
    options available work for you.

    For remotely executing commands on systems, take a look at psexec.exe which
    is included in pstools.zip. Note that there are several "unix-y"
    (unix-ish?) utilities within the zip file. Download for free at
    http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

    Joe A


    "David Eisner" <> wrote in message
    news:...
    > I'd like to change NTFS file system permissions using Powershell, both
    > at the command line and from a Powershell script.
    >
    > I come from the Unix world, where it's pretty straightforward: To
    > change ownership, you use the 'chown' command, and to change
    > permissions, you use either 'chmod' or 'setfacl'.
    >
    > How would I do the same thing in Powershell? I'd like to be able to
    > do this locally (on a Windows Server 2003 box), and hopefully remotely
    > (from a Windows XP client, say).
    >
    > Googling around, I see many different discussions threads, with
    > conflicting information about how you might do it (try this script I
    > wrote, download this utility, etc.), or whether it's even possible to
    > change the owner to a non-Administrative user account using anything
    > other than the security tab in the GUI. I'm surprised such a basic
    > operation is such a fertile topic for discussion and debate.
    >
    > Powershell is pretty cool, and I'm hoping I can use it to accomplish
    > my task.
    >
    > Thanks in advance!
    >
    > -David
    Joe Acosta, Oct 21, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Fields
    Replies:
    1
    Views:
    1,135
    Tony Fields
    Feb 8, 2005
  2. Anthony
    Replies:
    0
    Views:
    407
    Anthony
    May 22, 2007
  3. Herb Martin
    Replies:
    2
    Views:
    884
  4. Joel Pratt
    Replies:
    3
    Views:
    186
    net_admin
    Feb 5, 2008
  5. Jeffrey  Snover [MSFT]

    Windows PowerShell and the "PowerShell Worm"

    Jeffrey Snover [MSFT], Aug 3, 2006, in forum: Scripting
    Replies:
    0
    Views:
    263
    Jeffrey Snover [MSFT]
    Aug 3, 2006
Loading...

Share This Page