The Storage Team Blog about file services and storage features in Windows Server, Windows XP, Windows Vista and Windows 7.
This post covers the Server for NFS PowerShell cmdlets in Windows Server 2012 with brief description about each of them.
You can get Server for NFS PowerShell cmdlets by installing “Server for NFS” role service from the File and Storage Services or by installing “Services for Network File System Management Tools” from Remote Server Administration Tools.
You can list the entire Server for NFS PowerShell cmdlets by running the following command
Get-Command –Module NFS
The following table lists Server for NFS cmdlets grouped by functionality.
Lists all the shares on the server along with their properties.
Creates a new share on the server.
The share can be a standard share or a clustered share.
Modifies the share configuration of standard as well as clustered shares.
Deletes NFS shares from the server. The share can be a standard or clustered share.
Retrieves the permissions on a share.
Adds or modifies share permissions.
Permissions can be granted to individual hosts, global (all machines) or to groups such as clientgroup or netgroups.
Allows granting read only, read write or no access to clients.
Removes permissions for a given client on a share.
Retrieves the Server for NFS configuration.
Modifies Server for NFS configuration.
Retrieves Client for NFS configuration.
Modifies Client for NFS configuration. Multiple client configuration properties can be modified at the same time.
Modifies the netgroup source configuration on the server. The netgroup source can be Active Directory, RFC2307 compliant LDAP server or NIS server.
Retrieves the netgroup source configuration on the server. The server can be configured to use Active Directory, RFC2307 compliant LDAP or NIS server netgroup stores as its netgroup source.
Identity Mapping Store
Retrieves the identity mapping source on the server or client. The identity mapping source can be configured to use local files such as passwd and group files, Active Directory, RFC2307 compliant LDAP server or a User Name Mapping server as its identity mapping source.
Modifies the mapping store on NFS server or client.
Installs and configures an Active Directory Lightweight Directory Service server as mapping store.
The cmdlet installs the AD LDS role, creates an instance for the mapping store and also adds the schema required for the UID and GID attributes for user/group objects.
Verifies if the mapping store on the server has been configured correctly. It verifies that the mapping store is reachable and also checks if necessary schema is installed on the server and if the domain functional level is Windows Server 2003 R2 and above in case of domain based mapping store.
Lists all the mapping between a user's UNIX and Windows accounts from the identity mapping source.
The cmdlet can retrieve mapping from various mapping sources. The mapping source can be Active Directory, RFC2307 compliant LDAP server or mapping files (passwd/group files). If the mapping source is not specified, the cmdlet uses server’s mapping source configuration to retrieve the information.
Creates a new mapping between windows user (or group) account to corresponding UNIX identifier.
The mapping store can be Active Directory or RFC2307 compliant LDAP server.
User or group account is created if they don’t exist.
Modifies or sets a mapping between a Windows user/group account to UNIX identifiers.
Removes a mapping from a user or group windows account.
Checks that the server can resolve a mapping for given user or group account name to UNIX identifier and vice versa.
The server uses its identity mapping source configuration to retrieve the mapping.
Verifies existing mapped identities and checks if they are configured correctly.
The cmdlet will check for duplicate UID\GID and also validates the group membership for user accounts as per GID assignment.
Enumerates the clients connected to Server for NFS using NFS v4.1.
Revoke a client V4.1 connection to Server for NFS.
Lists all the clientgroups on the Server for NFS.
Creates a new clientgroup on the server. Members can also be added to the new clientgroup at the time of creation.
Adds or removes members from a clientgroup. Multiple members can be added or removed in a single command.
Renames a clientgroup.
Deletes a clientgroup from the server.
Enumerates netgroups configured in Active Directory, RFC2307 compliant LDAP server or NIS server.
Deletes a netgroup from Active Directory or LDAP server.
Creates a new netgroup in Active Directory or LDAP server. Members can also be added to netgroup at the time of creation.
Adds or removes members from a netrgroup. The netgroup store can be Active Directory or RFC2307 compliant LDAP server.
List the locks opened by a client on the server. The cmdlet lists both the NLM and NFS v4.1 byte range locks.
Revokes locks on a given set of files or locks held by a given client computer.
Revokes open state and handles for files opened by clients using NFS V4.1 to Server for NFS.
Enumerates file opened using NFS V4.1 on Server for NFS.
Disconnect an NFS V4.1 session on Server for NFS.
List the currently open V4.1 sessions on Server for NFS.
Resets the statistics on Server for NFS.
Enumerates NFS and MOUNT statistics on the server
Please send feedback you might have to email@example.com