Quantcast
Channel: Software Communities : Popular Discussions - ActiveRoles
Viewing all articles
Browse latest Browse all 1277

Adding Deprovision Step to Delete Re-directed MyDocuments

$
0
0

Hi,

 

Can anyone offer some guidance on a good approach for deleting a users redirected MyDocuments folder during the deprovisioning process.  I want to add that step to delete the folder recursively when the account is permanently deleted (say 30 days after deprovision).  I've read and seen some scripts but not sure how to put it all together, or if that's even the right way to go.  Some of the code snippets I've found and played with so far include:

 

$MyDocs=$([Environment]::GetFolderPath("mydocuments"))

 

Get-ChildItem $MyDocs -recurse | ForEach-Object {Get-Acl $_.FullName}

 

<then take ownership, presumably by the ARS service account>

 

My current ARS 6.7 deprovision policy looks like the attached screenshot.

 

Any advice is appreciated.

 

Thanks.

 

-Steve


Viewing all articles
Browse latest Browse all 1277

Trending Articles