Skip to content

New-TinyURL

SYNOPSIS

Generate a shortened URL using the TinyURL service.

SYNTAX

New-TinyURL [-URI] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This function generates a shortened URL using the TinyURL service. It accepts a full URL as input and returns both the original and shortened URLs.

EXAMPLES

EXAMPLE 1

New-TinyURL -URI "https://www.example.com/very/long/url"

Generates a shortened TinyURL for the provided URL.

EXAMPLE 2

"https://www.example.com/another/long/url" | New-TinyURL

Pipes a URL to the function to generate a shortened TinyURL.

PARAMETERS

-URI

The full URL to be shortened. Must be a valid and non-empty string.

Type: String
Parameter Sets: (All)
Aliases: AbsoluteUri, URL

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES