Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - get permissions from share via wmi possible

Reply
 
Old 06-12-2007   #1 (permalink)
Frank


 
 

get permissions from share via wmi possible

Hi,

Is it possible to get permissions from a share via something like get-acl
and then apply it to another share? I am migrating a server which has a lot
of shares with various permissions. I started with:

gwmi win32_share -computername prodfile01 |sort path

thanks,



My System SpecsSystem Spec
Old 06-14-2007   #2 (permalink)
Justin Rich


 
 

Re: get permissions from share via wmi possible

Well i found out you cant do it with get-acl

what i attempted was this

$test = get-acl \\machine\share
set-acl \\new\share $test

what it did was wipe out the security list of the share. it had no effect on
the share security.

so other than it didnt work AT ALL.. i learned that it still looks at the
file level security and not the share security, so even if you figured out
how to get it to copy correctly, it still isnt going to do share level
permissions.

and i wasnt able to find the security info in WMI so your SOL there as well.

it might be in WMI some place, i just cant locate it.

Justin

"Frank" <Frank@discussions.microsoft.com> wrote in message
news:B4DBF9A8-3FA2-4461-885B-541EBA49B61A@microsoft.com...
> Hi,
>
> Is it possible to get permissions from a share via something like get-acl
> and then apply it to another share? I am migrating a server which has a
> lot
> of shares with various permissions. I started with:
>
> gwmi win32_share -computername prodfile01 |sort path
>
> thanks,
>
>



My System SpecsSystem Spec
Old 06-14-2007   #3 (permalink)
Frank


 
 

Re: get permissions from share via wmi possible

Justin,

What I finally did was used rmtshare to grab the share info which has the
perms, then I used PS to parse it and create "net share" commands to migrate
shares to our new server.



"Justin Rich" wrote:

> Well i found out you cant do it with get-acl
>
> what i attempted was this
>
> $test = get-acl \\machine\share
> set-acl \\new\share $test
>
> what it did was wipe out the security list of the share. it had no effect on
> the share security.
>
> so other than it didnt work AT ALL.. i learned that it still looks at the
> file level security and not the share security, so even if you figured out
> how to get it to copy correctly, it still isnt going to do share level
> permissions.
>
> and i wasnt able to find the security info in WMI so your SOL there as well.
>
> it might be in WMI some place, i just cant locate it.
>
> Justin
>
> "Frank" <Frank@discussions.microsoft.com> wrote in message
> news:B4DBF9A8-3FA2-4461-885B-541EBA49B61A@microsoft.com...
> > Hi,
> >
> > Is it possible to get permissions from a share via something like get-acl
> > and then apply it to another share? I am migrating a server which has a
> > lot
> > of shares with various permissions. I started with:
> >
> > gwmi win32_share -computername prodfile01 |sort path
> >
> > thanks,
> >
> >

>
>
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Share Permissions For Folders General Discussion
Re: Searching Network Share Permissions VB Script
Setting share permissions from PowerShell? PowerShell
Setting share permissions on a files server that does not support PowerShell
user permissions from local computer to network share Vista account administration


Vista Forums 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 Ltd

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