Returns the content security policy at from the given URL.
Get-ContentSecurityPolicy.ps1 [-Uri] <Uri> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-ContentSecurityPolicy.ps1 -Response <WebResponseObject> [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Invoke-WebRequest http://example.org/ |Get-ContentSecurityPolicy.ps1
default-src : {http://example.org, http://example.net, ‘self’} script-src : {‘self’} img-src : {‘self’} report-uri : {http://example.com/csp}
The URL to get the policy from.
Type: Uri
Parameter Sets: Uri
Aliases: Url
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The output from Invoke-WebRequest to parse the policy from.
Type: WebResponseObject
Parameter Sets: Response
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
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.