Export & Import NFS Server Permissions of Windows Server°2012R2 Using Powershell

Steps to Export & Import NFS Server Permissions of  Windows Server°2012R2 Using Powershell


Export NFS share permissions

  1. To export the NFS share permissions for all the NFS shares, type:

    PS C:\tmp> Get-NfsShare | Get-NfsSharePermission | Export-Clixml NfsSharePermission.xml
    

    Next, update the host configuration information using the following steps. You can ignore these steps if the net name and host names are going to remain the same.
    1. Open the file where the exported permissions are located (for example, c:\tmp\NfsSharePermission.xml).
    2. Find the network name and host name, and then rename them as appropriate.
    3. If necessary, update the location of the directory path.
    4. Save the file that contains the exported permissions (such as c:\tmp\NfsShares.xml).
      

    Import NFS share permissions

      
    Before performing this step, make sure that the Nfssharepermission.xml file is updated with the correct server names. To import NFS share permissions, open Windows PowerShell, and type:

    PS C:\tmp> Import-Clixml NfsSharePermission.xml | foreach { $_ |Grant-NfsSharePermission}
    
     
     
 
 

 




Comments

Popular posts from this blog

SQL SERVER – Event ID 107- Report Server Windows Service (MSSQLSERVER) cannot connect to the report server database.

SQL Server Builds Information

Using DBCA silent install and disabling automatic memory management