Powershell – Update NTFS Audit Levels

Here are the required steps for updating audit rules on Windows NTFS shares with PowerShell.

 # PowerShell Script used for updating and removing NTFS Audit Rules
 # The $path variable represents the UNC path to the share that the script is being executed against.
 #
 # Comment or Un-Comment the Remove or Set rules to update a shares permissions.
get-date
 $path \\\
# Get the current ACL details
 $CurrentACL = get-acl $path
if (!($CurrentACL -eq $null)) {
# Success & Failure
 $AccessRule = new-object System.Security.AccessControl.FileSystemAuditRule("Everyone","ChangePermissions,DeleteSubdirectoriesAndFiles,Delete,TakeOwnership","ContainerInherit","None","Success,Failure")
# Remove Audit Rule
 #$CurrentACL.RemoveAuditRule($AccessRule)
# Set New Audit Rule
 #$CurrentACL.AddAuditRule($AccessRule)
# Apply New Permissions
 set-acl $path -AclObject $CurrentACL
 } else {
 Write-Host "ACL's unsuccessfully pulled from path $path"
 }
get-date
Advertisements

NetApp SnapMirror 7-Mode to Cluster-Mode

Here are the steps required to manually initiate a snapmirror relationship between a NetApp 7-Mode and a Cluster-Mode

7-Mode to Cluster Mode Version Requirements
Source Filer: 8.x 7-Mode and Higher
Dest. Filer: 8.2.x and Higher

7-Mode Source Filer Steps
– Allow destination filer either within snapmirror.allow file or within options snapmirror.access host =

Cluster-Mode Destination Filer Steps
– Create a new transition Lif assigned to a Node which is set to intercluster for both the Role and the Firewall Policy.
– Create a vserver peer transition relationship between the source and destination filer and associate it to the transition lif
– Create a new destination volume that is the same size or bigger than the source volume. Make sure to specify the type of the volume as DP (data protection)
– Create the new snapmirror relationship with type set to TDP
– Initialize the mirror using snapmirror initialize followed by the destination path

Optionally you can create a snapmirror policy that is applied to any new transition snapmirror relationships to ensure consistency when cutting over volumes in bulk.