This extension we bring commands to manage your file/folder permissions and to help you migrate your file server
Get-FileAccessRule s
This command gets access on the target path
Span style= "font-family: ' Microsoft Yahei ';" >650) this.width=650; "title=" the command gets access on the target path "style=" HEIGHT:254PX;WIDTH:605PX; " Border= "0" alt= "This command will get access on the target path" src= "Http://www.ilync.cn/photos/attached/1e376454c003cf73d350775535676153.png" Width= "850" height= "391"/> 
course if you need to get the path the file/folder owner can use Get-acl (the command is a system command)
650) this.width=650; "title=" Of course if you need to get the path the file/folder owner can use Get-acl (the command is a system command) "style=" HEIGHT:85PX;WIDTH:613PX; "border= "0" alt= "of course if you need to get that path the file/folder owner can use GET-ACL (the command for the system command)" src= "http://www.ilync.cn/photos/attached/ A7558e6597144c712b15e7ac0d136581.png "width=" 1170 "height=" 156 "/>
Remove-fileaccessrules
This command will delete the access rights at the specified location
650) this.width=650; "title=" the command will delete the access permission for the specified location "style=" HEIGHT:114PX;WIDTH:614PX; "border=" 0 "alt=" the command will delete access rights at the specified location "src = "Http://www.ilync.cn/photos/attached/ff015712dbbb61d0f7bb582bdea5b270.png" width= "height="/> "208"
we get specific access rights through Get-fileaccessrules, which is passed through the pipeline to delete
Note that when a target has permission inheritance, the access permission to remove is inherited and cannot be deleted (non-bug)
New-fileaccessrules
the command will generate the specified access rights
650) this.width=650; "title=" the command will generate the specified access rights "style=" HEIGHT:133PX;WIDTH:621PX; "border=" 0 "alt=" the command will generate the specified access rights "src = "Http://www.ilync.cn/photos/attached/8d799626f987b14eba3879bb7c9f81b2.png" width= "647" height= "/> "
of course, you can also specify inheritance, propagate inheritance and other identities
650) this.width=650; "title=" Of course you can also specify inheritance, propagate inheritance and other identity "style=" HEIGHT:107PX;WIDTH:619PX; "border=" 0 "alt=" Of course you can also specify inheritance, Propagate inheritance, etc. identity "src=" Http://www.ilync.cn/photos/attached/a8e62541bfcf758a27836954a449b1a6.png "width=" 1119 "height=" 130 " />
Add-fileaccesssecurity
This command adds the specified access rights to the safe list of files/folders for the specified path.
650) this.width=650; "title=" the command will add the specified access rights to the safe list of files/folders for the specified path "style=" HEIGHT:132PX;WIDTH:598PX; "border=" 0 "alt=" This command adds the specified access rights to the safe list of files/folders for the specified path "src=" Http://www.ilync.cn/photos/attached/ccbb983466fda76c62cf6c579b4949c4.png "Width=" 1154 "height=" 229 "/>
$acl = new-fileaccessrules-rights fullcontrol-action deny-principal "Ilyncalice"-inheritanceflags
Containerinherit-inheritancelevel inherited
Add-fileaccesssecurity-path " win209 Estasda2d1spowershell scriptdemocode "-rule $acl
We use the New-fileaccessrules command to create an inherited permission to append it to the specified file via the add-fileaccesssecurity command/
folder on
Below we will describe the heavyweight commands in this release extension
Get-migratereport
This command will test the source path that is about to be migrated, the target path permission requirements, and information such as EFS encryption to help you determine the source/destination path that you want to migrate
Thus ensuring a long migration success
650) this.width=650; "title=" the command will test the source path that is about to be migrated, the target path permission requirements, and EFS encryption information in order to help you determine the source/destination path you are migrating to ensure a long migration success "style=" Height : 114px;width:612px; "border=" 0 "alt=" This command will test the source path that is about to be migrated, the target path permission requirements, and EFS encryption information in order to help you determine the source/destination path you are migrating to ensure a long migration success "src=" http ://www.ilync.cn/photos/attached/98ef565887e81b228964c13f72cbe7b4.png "width=" 723 "height=" 122 "/>
we put the result of the command into a variable of $
650) this.width=650; "Title=" We put the result of the command into a variable of "border=" 0 "alt=" We put the result of the command into a variable "src=" http://www.ilync.cn/ Photos/attached/08065c61c34f9f9c3f4fc8ad85d3c460.png "/>
The following 4 properties exist in this variable, respectively,
efsdirectory All EFS-encrypted folders in the source path are included in this property
Efsfiles All EFS-encrypted files in the source path are included in this property
Errordirectory This property contains all the current accounts in the source path with no permission to read, or insufficient permissions for the folder
Errorfiles This property contains all the current accounts in the source path without permission to read, or insufficient permissions to the file
we are in the migration source path for the user right to perform the migration action. We just need to satisfy the "read" permission, which includes read execution, read permission,
Read Extended properties Of course if you have full control, you meet the requirements.
When an EFS encrypted File/folder is present in the migration source path, the file/folder with insufficient permissions will be skipped by the migration to avoid failure
You can use the information returned in the command results to examine your source in detail, and if you are sure to ignore these issues, the files/folders are migrated
Time Will will skip, not affect the source, and the migration process.
Migrate-fileThis command will allow you to migrate your files/folders
This command supports the local path share path and the mapped network drive as the migration source, and the migration destination path
also skip the no permissions, insufficient permissions, and EFS-encrypted files/folders while migrating
Migrate-file-sourcedc25012123-targetwin209 estasda2d1s-share
This command indicates the migration source and the destination path where you add share when the migration source path is a shared path
parameters to enable commands to support shared paths as source of migration
650) this.width=650; "title=" parameter to enable command to share path support for migration source "border=" 0 "alt=" parameter to enable command to share path support for migration source "src=" http://www.ilync.cn/ Photos/attached/996941c2e8b8d876f37c31e8c69497f4.png "/>
650) this.width=650; "title=" parameter to enable command to share path support for migration source "border=" 0 "alt=" parameter to enable command to share path support for migration source "src=" http://www.ilync.cn/ Photos/attached/feecd8bf4228dfe14997635eee86ed3e.png "/>
650) this.width=650; "title=" parameter to enable command to share path support for migration source "border=" 0 "alt=" parameter to enable command to share path support for migration source " Src= "Http://www.ilync.cn/photos/attached/8a62d5e200e5dd338b24cd2a147ceb94.png"/>
 
they are Move error related log was found during move "then the Error.log log file will be generated under the migration target and path
The following is an introduction to the advanced parameters of the command
The BUFFERMB parameter indicates the amount of memory used to write cache during migration if the file size is less than this value is invalid by default to 100
The Readlength parameter indicates that the file is used as a one-time maximum read file size in the migration process if the current file size is less than this value, the files are not enabled
Split Pass
Otherwise enable split transfer default to 512
The above two parameters can help improve migration efficiency when migrating larger files, but will increase the memory usage of PowerShell if migrating to a shared path is not properly modified
these two parameters will reduce network utilization.
When these two parameters are in effect
650) this.width=650: "alt=" when "title=" two parameters are in effect when "border=" 0 "src=" two parameters are in effect http://www.ilync.cn/photos/attached/ 563eed957afe80fb3c4d7435dc054521.png "/>
The supported migration source/migration target combinations are listed in the following table
|
Local Path |
Map Network paths |
Shared paths |
Migration source |
Support |
Support |
Support |
Migration targets |
Support |
Support |
Support |
the Blue font Indicates the need to add the share parameter
Note Migrate-file,get-migratereport These two commands do not support dynamic File/folder additions,
If the folder is added/deleted between the migration/Run tests then the added folder/file will not be recognized,
Deleted files/folders may be alert/failed while the Migrate-file command does not support incremental migration of any files/files of the same name in the target path
The clip will be backed up before the operation is overwritten.
Snapin Download Baidu Cloud: Http://pan.baidu.com/s/1o60Xuo6
This snapin information applies to Windows Server version 2012/2012 R2
The framework version. NETFramework 4.0
Current Snapin Version 1.0.0.0
Minimum Windowspowershell version 2.0
The following table lists the snapin tested platforms
Target platform |
Available |
Windows Server 2012R2 |
YES |
Windows Server 2012 |
YES |
Windows Server 2008R2 |
Not tested |
Windows Server 2008 |
Not tested |
Do not use this command in a production environment, and if you are sure to use it in a production environment, test it well
Shanghai Union Education and the author does not assume any responsibility for any unexpected behavior in the production environment of the order.
---This document is provided by http://www.iLync.cn Tian Mengbo Original, if you have any questions, please call: 021-60745131---
This article is from the "Ilync" blog, make sure to keep this source http://ilync.blog.51cto.com/6203086/1577506
PowerShell extension tool wave four!