external help file | Module Name | online version | schema |
---|---|---|---|
pwshCloudflare-help.xml |
pwshCloudflare |
2.0.0 |
Creates a new DNS record for a Cloudflare zone.
New-CFZoneRecord -ZoneId <String> -Content <String> -Name <String> -Type <String> [-TTL <Int32>]
[-Proxied <Boolean>] [<CommonParameters>]
New-CFZoneRecord -ZoneName <String> -Content <String> -Name <String> -Type <String> [-TTL <Int32>]
[-Proxied <Boolean>] [<CommonParameters>]
The New-CFZoneRecord function creates a new DNS record for a Cloudflare zone. It supports creating records by either ZoneId or ZoneName. The function requires the Content, Name, Type, TTL, and Proxied parameters to be specified. Additional parameters are required for specific record types (MX, SRV, and URI).
New-CFZoneRecord -ZoneId '1234567890abcdef' -Content '192.168.1.1' -Name 'example.com' -Type 'A' -TTL 3600 -Proxied $true
Creates a new 'A' record with the specified parameters in the Cloudflare zone with the ID '1234567890abcdef'.
New-CFZoneRecord -ZoneName 'example.com' -Content 'mail.example.com' -Name 'example.com' -Type 'MX' -TTL 3600 -Proxied $false -Priority 10
Creates a new 'MX' record with the specified parameters in the Cloudflare zone with the name 'example.com'.
Specifies the ID of the Cloudflare zone where the DNS record will be created. This parameter is mandatory when using the ZoneId parameter set.
Type: String
Parameter Sets: ZoneId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the Cloudflare zone where the DNS record will be created. This parameter is mandatory when using the ZoneName parameter set.
Type: String
Parameter Sets: ZoneName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the content of the DNS record.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the DNS record.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the type of the DNS record. Valid values are 'A', 'AAAA', 'CNAME', 'TXT', and 'MX'.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the Time To Live (TTL) of the DNS record in seconds. Setting it to 1 means 'automatic'. The value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Specifies whether the record is proxied through Cloudflare (orange cloud).
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
https://github.com/connorcarnes/pwshCloudflare
https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-create-dns-record