Steps to Export & Import NFS Server Permissions of Windows Server°2012R2 Using Powershell
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.
- Open the file where the exported permissions are located (for example, c:\tmp\NfsSharePermission.xml).
- Find the network name and host name, and then rename them as appropriate.
- If necessary, update the location of the directory path.
- Save the file that contains the exported permissions (such as c:\tmp\NfsShares.xml).
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