New-AzStorageFileSymbolicLink
Creates a symbolic link to a specified file. Only works in NFS file share.
Syntax
ShareName (Default)
New-AzStorageFileSymbolicLink
[-ShareName] <String>
[-Path] <String>
[-LinkText] <String>
[-Metadata <Hashtable>]
[-FileCreatedOn <DateTimeOffset>]
[-FileLastWrittenOn <DateTimeOffset>]
[-Owner <String>]
[-Group <String>]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Share
New-AzStorageFileSymbolicLink
[-ShareClient] <ShareClient>
[-Path] <String>
[-LinkText] <String>
[-Metadata <Hashtable>]
[-FileCreatedOn <DateTimeOffset>]
[-FileLastWrittenOn <DateTimeOffset>]
[-Owner <String>]
[-Group <String>]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Directory
New-AzStorageFileSymbolicLink
[-ShareDirectoryClient] <ShareDirectoryClient>
[-Path] <String>
[-LinkText] <String>
[-Metadata <Hashtable>]
[-FileCreatedOn <DateTimeOffset>]
[-FileLastWrittenOn <DateTimeOffset>]
[-Owner <String>]
[-Group <String>]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzStorageFileSymbolicLink cmdlet creates a symbolic link to a file in an Azure File share. This cmdlet only works with NFS file shares. A symbolic link is a file that points to another file or directory. The symbolic link can point to files in the same file share or even outside the file share using relative or absolute paths.
Examples
Example 1: Create a symbolic link with all optional parameters
$ctx = New-AzStorageContext -StorageAccountName "myaccount" -EnableFileBackupRequestIntent
New-AzStorageFileSymbolicLink -ShareName "nfsshare" -Path "links/testlink" -LinkText "config/app.conf" -Metadata @{ "meta1"="value1";"meta2"="value2"} -FileCreatedOn "2025-09-01T00:00:00Z" -FileLastWrittenOn "2025-09-15T12:00:00Z" -Owner "1000" -Group "1000" -Context $ctx
This command creates a symbolic link with all available optional parametersThe symbolic link points to a relative path "config/app.conf".
Example 2: Create a symbolic link using ShareClient object
$ctx = New-AzStorageContext -StorageAccountName "myaccount" -EnableFileBackupRequestIntent
$shareClient = Get-AzStorageShare -Name "nfsshare" -Context $ctx
$shareClient | New-AzStorageFileSymbolicLink -Path "dir1/app-link" -LinkText "config/app.conf"
This command creates a symbolic link using a ShareClient object obtained from Get-AzStorageShare.
Example 3: Create a symbolic link using directory client
$ctx = New-AzStorageContext -StorageAccountName "myaccount" -EnableFileBackupRequestIntent
$dirClient = Get-AzStorageFile -ShareName "nfsshare" -Path "testdir" -Context $ctx
$dirClient | New-AzStorageFileSymbolicLink -Path "testlink" -LinkText "app/main.exe"
This command creates a symbolic link within a specific directory using a ShareDirectoryClient object.
Parameters
-ClientTimeoutPerRequest
The client side maximum execution time for each request in seconds.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ClientTimeoutPerRequestInSeconds
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ConcurrentTaskCount
The total amount of concurrent async tasks.
The default value is 10.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Context
Azure Storage Context Object
Parameter properties
Type: IStorageContext
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileCreatedOn
The creation time of the symbolic link.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileLastWrittenOn
The last write time of the symbolic link.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Group
Optional.
The owner group identifier (GID) to be set on the symbolic link.
The default value is 0 (root group).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LinkText
The absolute or relative path to the file to be linked to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Optional custom metadata to set for the symbolic link.
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Owner
Optional.
The owner user identifier (UID) to be set on the symbolic link.
The default value is 0 (root).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Path
Path of the symbolic link to be created.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-ServerTimeoutPerRequest
The server time out for each request in seconds.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ServerTimeoutPerRequestInSeconds
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ShareClient
ShareClient object indicated the share where the symbolic link would be created.
Parameter properties
Type: ShareClient
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Share
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-ShareDirectoryClient
ShareDirectoryClient object indicated the base folder where the symbolic link would be created.
Parameter properties
Parameter sets
Directory
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-ShareName
Name of the file share where the symbolic link would be created.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ShareName
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs
Notes
This cmdlet only works with NFS file shares
Symbolic links can point to files within the same share or external locations
The symbolic link will appear as a regular file in directory listings but contains a reference to the target path