external help file | Module Name | online version | schema |
---|---|---|---|
PSShlink-help.xml |
PSShlink |
2.0.0 |
Get details of all short codes, or just one.
Get-ShlinkUrl [-SearchTerm <String>] [-Tags <String[]>] [-TagsMode <String>] [-OrderBy <String>]
[-StartDate <DateTime>] [-EndDate <DateTime>] [-ExcludeMaxVisitsReached] [-ExcludePastValidUntil]
[-ShlinkServer <String>] [-ShlinkApiKey <SecureString>] [<CommonParameters>]
Get-ShlinkUrl -ShortCode <String> [-Domain <String>] [-ShlinkServer <String>] [-ShlinkApiKey <SecureString>]
[<CommonParameters>]
Get details of all short codes, or just one. Various filtering options are available from the API to ambigiously search for short codes.
Get-ShlinkUrl
Returns all short codes with no filtering applied.
Get-ShlinkUrl -ShortCode "profile"
Returns the short code "profile".
Get-ShlinkUrl -ShortCode "profile" -Domain "example.com"
Returns the short code "profile" using the domain "example.com". This is useful if your Shlink instance is responding/creating short URLs for multiple domains.
Get-ShlinkUrl -Tags "oldwebsite", "evenolderwebsite" -TagsMode "any" -OrderBy "dateCreated-ASC"
Returns short codes which are associated with the tags "oldwebsite" or "evenolderwebsite". Ordered by the dateCreated property in ascending order.
Get-ShlinkUrl -StartDate (Get-Date "2020-10-25 11:00:00")
Returns short codes which have a start date of 25th October 2020 11:00:00 AM or newer. If a start date was not configured for the short code(s), this filters on the dateCreated property.
Get-ShlinkUrl -SearchTerm "microsoft"
Returns the short codes which match the search term "microsoft".
The name of the short code you wish to search for. For example, if the short URL is "https://example.com/new-url" then the short code is "new-url".
Type: String
Parameter Sets: ParseShortCode
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The domain (excluding schema) associated with the short code you wish to search for. For example, "example.com" is an acceptable value. This is useful if your Shlink instance is responding/creating short URLs for multiple domains.
Type: String
Parameter Sets: ParseShortCode
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The search term to search for a short code with.
Type: String
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
One or more tags can be passed to find short codes using said tag(s).
Type: String[]
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Tells how the filtering by tags should work, returning short URLs containing "any" of the tags, or "all" the tags. It's ignored if no tags are provided, and defaults to "any" if not provided.
Type: String
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Order the results returned by "longUrl-ASC", "longUrl-DESC", "shortCode-ASC", "shortCode-DESC", "dateCreated-ASC", "dateCreated-DESC", "visits-ASC", "visits-DESC", "title-ASC", "title-DESC".
Type: String
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A datetime object to search for short codes where its start date is equal or greater than this value. If a start date is not configured for the short code(s), this filters on the dateCreated property.
Type: DateTime
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A datetime object to search for short codes where its end date is equal or less than this value.
Type: DateTime
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Short URLs which already reached their maximum amount of visits will be excluded.
Type: SwitchParameter
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Short URLs which validUntil date is on the past will be excluded.
Type: SwitchParameter
Parameter Sets: ListShortUrls
Aliases:
Required: False
Position: Named
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: Named
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: Named
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.