Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

take ownership and reset perms

Closed Thread
 
Thread Tools Display Modes
Old 09-24-2007   #1 (permalink)
Justin Rich
Guest


 

take ownership and reset perms

I have a folder of roaming profles (not windows profiles, but its the same
deal)

I need to take ownership and reset permissions so that the user (folder
name) and the admin group have full control to the folder.

is there a good way to do this with PS?

I was trying to find the old xcacls script but right now xcacls is giving me
an access denied error when i do a xcacls c:\folder /g administratos:OF

obviously i dont have access, thats why im doing the O for take
permissions...

id like to learn how to do it with PS but right now i just need the quickest
way possible.

Thanks
Justin


Old 09-24-2007   #2 (permalink)
Bob Landau
Guest


 

RE: take ownership and reset perms

Justin,

I'm sorry to say that you've answered the question yourself. Don't use PS if
you want a quick and easly solution. Use what you know in the enviroment it
knows.

I think I'm probably a month+ ahead on the curve but from my experience if
your under the gun you will only frustrate yourself by trying this in PS.

Having said that

Get-Acl
Set-Acl

are two of the main cmdlets you'll need. Get-ChildItem returns a single
file/directory. My guess is you'll be apply logic specific to each folder so
you will be walking the path using the results from Get-ChildItem and piping
this into ForEach

The other point is in order to stay popular in your office this script that
you write will need to be well tested.

bob

"Justin Rich" wrote:
Quote:

> I have a folder of roaming profles (not windows profiles, but its the same
> deal)
>
> I need to take ownership and reset permissions so that the user (folder
> name) and the admin group have full control to the folder.
>
> is there a good way to do this with PS?
>
> I was trying to find the old xcacls script but right now xcacls is giving me
> an access denied error when i do a xcacls c:\folder /g administratos:OF
>
> obviously i dont have access, thats why im doing the O for take
> permissions...
>
> id like to learn how to do it with PS but right now i just need the quickest
> way possible.
>
> Thanks
> Justin
>
>
>
Old 09-25-2007   #3 (permalink)
Justin Rich
Guest


 

Re: take ownership and reset perms

Thanks for the feedback.

the reason i look to PS is because the tools i normally use (resource kit
stuff) gives me an access denied. I know i have the rights to take
ownership, i can do it just fine manually...

I'll have to take a look at that and see what i can do.
At this point im not under the gun, but it looks like this will come around
again so i'd like to be ready for it next time.

Thanks
Justin

"Bob Landau" <BobLandau@xxxxxx> wrote in message
news:6DB5B86F-1CDB-44E4-A79E-FC79F4656379@xxxxxx
Quote:

> Justin,
>
> I'm sorry to say that you've answered the question yourself. Don't use PS
> if
> you want a quick and easly solution. Use what you know in the enviroment
> it
> knows.
>
> I think I'm probably a month+ ahead on the curve but from my experience if
> your under the gun you will only frustrate yourself by trying this in PS.
>
> Having said that
>
> Get-Acl
> Set-Acl
>
> are two of the main cmdlets you'll need. Get-ChildItem returns a single
> file/directory. My guess is you'll be apply logic specific to each folder
> so
> you will be walking the path using the results from Get-ChildItem and
> piping
> this into ForEach
>
> The other point is in order to stay popular in your office this script
> that
> you write will need to be well tested.
>
> bob
>
> "Justin Rich" wrote:
>
Quote:

>> I have a folder of roaming profles (not windows profiles, but its the
>> same
>> deal)
>>
>> I need to take ownership and reset permissions so that the user (folder
>> name) and the admin group have full control to the folder.
>>
>> is there a good way to do this with PS?
>>
>> I was trying to find the old xcacls script but right now xcacls is giving
>> me
>> an access denied error when i do a xcacls c:\folder /g administratos:OF
>>
>> obviously i dont have access, thats why im doing the O for take
>> permissions...
>>
>> id like to learn how to do it with PS but right now i just need the
>> quickest
>> way possible.
>>
>> Thanks
>> Justin
>>
>>
>>

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Take ownership John Reid Vista file management 2 03-11-2008 05:04 PM
Take ownership Bob Vista file management 1 01-09-2008 11:57 PM
Ownership Jacqui Vista security 2 08-27-2007 04:51 AM
Is possible to take ownership of a lot of files? Magno Vista security 6 06-28-2007 08:58 AM
Ownership ? Jerald D Montgomery Vista file management 4 01-01-2007 05:29 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50