Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP 7-mode documentation.

Cmdlet: Add-NcCifsSymlink


NAME
Add-NcCifsSymlink

SYNOPSIS
Create a new CIFS symbolic link path mapping from a UNIX symlink to a target
CIFS path.

SYNTAX
Add-NcCifsSymlink [-UnixPath] <String> [-ShareName] <String> [-CifsPath] <St
ring> [-CifsServer <String>] [-Locality <String>] [-VserverContext <String>]
[-Controller <NcController[]>] [<CommonParameters>]


DESCRIPTION
Create a new CIFS symbolic link path mapping from a UNIX symlink to a target
CIFS path. This symbolic link path mapping will be effective on symbolic li
nks that have a prefix match with the value of 'unix-path'. e.g.: if the val
ue of 'unix-path' is '/usr/local/' and there exists a symbolic link on the f
ile system at '/home/user/link' which points to '/usr/local/share/dest'. If
a CIFS client accesses the symbolic link 'link', this entry of path mapping
would have a prefix match '/usr/local/'. The CIFS client would be redirected
to the location pointed to by this path mapping's 'CifsServer', 'ShareName'
and 'CifsPath' fields.


PARAMETERS
-UnixPath <String>
This field specifies the UNIX path prefix to be matched for the mapping.
If the prefix of the target path in the symbolic link matches against t
his field, this entry of symbolic link path mapping would be used. The p
ath is a UTF-8 string and supports localization. The path must start and
end with a forward slash ('/'). For example '/usr/local/'.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-ShareName <String>
This field specifies the CIFS share name on the destination CIFS server
to which the symbolic link is mapped. This is a UTF-8 string and support
s localization.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-CifsPath <String>
This field specifies the CIFS path on the destination to which the symbo
lic link maps. The final path is generated by concatenating the CIFS ser
ver name, the share name, the cifs-path and the remaining path in the sy
mbolic link left after the prefix match. This value is specified by usin
g a UNIX-style path name. The trailing forward slash is required for the
full path name to be properly interpreted. This is a UTF-8 string and s
upports localization.

Required? true
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-CifsServer <String>
This field specifies the destination CIFS server name for the mapping to
which the symbolic link is mapped. The default is the local CIFS server
. The field needs to be specified if the locality of the symbolic link i
s 'widelink'. This can be either a DNS name, NetBIOS name or an IP addre
ss. If a DNS name or a NetBIOS name are specified, the CIFS client confi
guration should be such that it is capable of resolving the CIFS server
name to the correct IP address.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Locality <String>
This field specifies whether the CIFS symbolic link is a local link or w
ide link. A local symbolic link maps to the local CIFS share, whereas a
wide symbolic link maps to any CIFS share on the network. If the CIFS se
rver matches the VServer's NetBIOS name then the default value is local
otherwise widelink. Possible values:
"local" - Share On This VServer
"widelink" - Share On Another CIFS Server

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-VserverContext <String>
Vserver to which to direct this command. If the currently connected con
troller (as embodied by an NcController object) represents a cluster, th
ere are multiple means to address commands to one of its vservers. Eith
er set the Vserver field on the NcController object to direct all subseq
uent commands to that vserver, or supply the VserverContext parameter to
an individual cmdlet. Only cmdlets which may be invoked on vservers of
fer the VserverContext parameter.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NcController[]>
A clustered Data ONTAP controller to receive this cmdlet, as embodied by
an NcController object. This parameter is returned by the Connect-NcCo
ntroller cmdlet. If not specified, the value in the global variable Cur
rentNcController is used. In the latter case, if CurrentNcController co
ntains a collection of NcController objects, this cmdlet is invoked on e
ach controller in succession.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.C.Types.Cifs.CifsSymlink


NOTES


Category: cifs
API: cifs-symlink-create
Family: vserver

-------------- Example 1 --------------

C:\PS>Add-NcCifsSymlink -UnixPath /usr/user/ -ShareName cifsvol1 -CifsPath /
cifsvol1/user/


Add a CIFS symlink with unix path /usr/user/ and CIFS path /cifsvol1/user/


CifsServer ShareName UnixPath Cif
sPath Locality
---------- --------- -------- ---
----- --------
CIFS01 cifsvol1 /usr/user/ /ci
fsvol1/user/ local



RELATED LINKS
Get-NcCifsSymlink
Remove-NcCifsSymlink
Set-NcCifsSymlink







 Data ONTAP® PowerShell Toolkit