Skip to content

Rename-AppPool

SYNOPSIS

Rename an IIS application pool.

SYNTAX

Rename-AppPool [-oldName] <String> [-newName] <String> [<CommonParameters>]

DESCRIPTION

This function renames an IIS application pool by updating its name and reassigning all associated sites and applications. It ensures that no conflicts exist with the new name and temporarily assigns a placeholder pool during the renaming process.

EXAMPLES

EXAMPLE 1

Rename-AppPool -oldName "OldAppPool" -newName "NewAppPool"

Renames the application pool "OldAppPool" to "NewAppPool" and updates all associated sites and applications.

PARAMETERS

-oldName

The current name of the IIS application pool to be renamed.

Type: String
Parameter Sets: (All)
Aliases:

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

-newName

The new name for the IIS application pool.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
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