external help file | Module Name | online version | schema |
---|---|---|---|
PSShlink-help.xml |
PSShlink |
2.0.0 |
Update an existing short code on the Shlink server.
Set-ShlinkUrl [-ShortCode] <String[]> [[-LongUrl] <String>] [[-AndroidLongUrl] <String>]
[[-IOSLongUrl] <String>] [[-DesktopLongUrl] <String>] [[-Tags] <String[]>] [[-ValidSince] <DateTime>]
[[-ValidUntil] <DateTime>] [[-MaxVisits] <Int32>] [[-Title] <String>] [[-Domain] <String>]
[[-ValidateUrl] <Boolean>] [[-ForwardQuery] <Boolean>] [[-Crawlable] <Boolean>] [[-ShlinkServer] <String>]
[[-ShlinkApiKey] <SecureString>] [<CommonParameters>]
Update an existing short code on the Shlink server.
Set-ShlinkUrl -ShortCode "profile" -LongUrl "https://github.com/codaamok" -ValidSince (Get-Date "2020-11-01") -ValidUntil (Get-Date "2020-11-30") -MaxVisits 99
Update the existing short code "profile", associated with the default domain of the Shlink server, to point to URL "https://github.com/codaamok". The link will only be valid for November 2020. The link will only work for 99 visits.
Set-ShlinkUrl -ShortCode "profile" -Tags "powershell","pwsh"
Update the existing short code "profile" to have the tags "powershell" and "pwsh" associated with it.
Get-ShlinkUrl -SearchTerm "preview" | Set-ShlinkUrl -Tags "preview"
Updates all existing short codes which match the search term "preview" to have the tag "preview".
The name of the short code you wish to update.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
The new long URL to associate with the existing short code.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The long URL to redirect to when the short URL is visited from a device running Android.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The long URL to redirect to when the short URL is visited from a device running iOS.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The long URL to redirect to when the short URL is visited from a desktop browser.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of one or more tags to associate with the existing short code. Due to the architecture of Shlink's REST API, this parameter can only be used in its own parameter set.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Define a new "valid since" date with the existing short code.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Define a new "valid until" date with the existing short code.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Set a new maximum visits threshold for the existing short code.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Define a title with the new short code.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The domain which is associated with the short code you wish to update. This is useful if your Shlink instance is responding/creating short URLs for multiple domains.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Control long URL validation while creating the short code.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 12
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Forwards UTM query parameters to the long URL if any were passed to the short URL.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Set short URLs as crawlable, making them be listed in the robots.txt as Allowed.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The URL of your Shlink server (including schema). For example "https://example.com". It is not required to use this parameter for every use of this function. When it is used once for any of the functions in the PSShlink module, its value is retained throughout the life of the PowerShell session and its value is only accessible within the module's scope.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 15
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A SecureString object of your Shlink server's API key. It is not required to use this parameter for every use of this function. When it is used once for any of the functions in the PSShlink module, its value is retained throughout the life of the PowerShell session and its value is only accessible within the module's scope.
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.