Get-IISWebsite
SYNOPSIS
Retrieve IIS site information from a local or remote computer.
SYNTAX
serverNames (Default)
iisAppName
DESCRIPTION
This function retrieves IIS site information from a local or remote computer. It can filter sites by name or exclude specific sites and supports retrieving all sites from specified servers.
EXAMPLES
EXAMPLE 1
Retrieves IIS site information from the default server list.
EXAMPLE 2
Retrieves IIS site information from the server 'SRVIISF3DV01'.
EXAMPLE 3
Retrieves IIS site information for the application named 'Prosper'.
EXAMPLE 4
Retrieves IIS site information from the server 'SRVIISF3DV01', excluding sites matching 'TestSite'.
PARAMETERS
-serverNames
An array of server names from which to retrieve IIS site information.
Type: String[]
Parameter Sets: serverNames
Aliases:
Required: False
Position: Named
Default value: $script:serverNames
Accept pipeline input: False
Accept wildcard characters: False
-iisAppName
The name of the IIS application to search for.
Type: String
Parameter Sets: iisAppName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-exclusion
A string to exclude sites matching the specified pattern.
Type: String
Parameter Sets: (All)
Aliases:
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.