Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Is there an Exclude switch for TAKEOWN?

$
0
0

I have a large number of old XP profile folders and all the new .V2 profile folders in the same directory on a server share.

Unfortunately when these profiles were created, they used default Windows NTFS settings which did not include the Administrators group.

So now I want to take ownership of all the XP profile folders so I can delete them while leaving the *.V2 profile folders alone.

TAKEOWN works great but I am unable to figure out how to exclude *.V2 folder names.

Does TAKEOWN not have an -Exclude switch or a way to accomplish what I'm trying to do? Thanks in advance.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>