< Back
New-CFConfig
Post
NAME New-CFConfig
SYNOPSIS
It is required to create a config file for the module using this command as the config file is used for all other
functions in this module.
SYNTAX
New-CFConfig -ApiKey <String> [-Confirm] -Domain <String> -Email <MailAddress> [-Path <String>] [-WhatIf]
[<CommonParameters>]
New-CFConfig -ApiKey <String> [-Confirm] -Email <MailAddress> [-Path <String>] [-WhatIf] -ZoneID <String>
[<CommonParameters>]
DESCRIPTION
Creates a config file to be used in conjunction with the other function in this module.
PARAMETERS
-ApiKey <String>
Global API Key on https://www.cloudflare.com/a/profile
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Domain <String>
The domain to use with the API
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Email <MailAddress>
The email address used to logon to Cloudflare
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Path <String>
Optional non default path to config file
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ZoneID <String>
The Zone ID of the domain to use with the API
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
Example 1
PS C:\\> New-CFConfig -Email 'email@example.com' -ApiKey 1234567890abcdef -Domain 'example.com'
Creates a new config file in the default location for the domain `example.com`
Example 2
PS C:\\> New-CFConfig -Email 'email@example.com' -ApiKey 1234567890abcdef -ZoneID abcdef1234567890
Creates a new config file in the deault location for the zone id `abcdef1234567890`
Example 3
PS C:\\> New-CFConfig -Email 'email@example.com' -ApiKey 1234567890abcdef -Domain 'example.net' -Path
'~\\CFExampleNet.xml'
Creates a new config file in a non-default location for the domain `example.net`
RELATED LINKS
SYNOPSIS
It is required to create a config file for the module using this command as the config file is used for all other
functions in this module.
SYNTAX
New-CFConfig -ApiKey <String> [-Confirm] -Domain <String> -Email <MailAddress> [-Path <String>] [-WhatIf]
[<CommonParameters>]
New-CFConfig -ApiKey <String> [-Confirm] -Email <MailAddress> [-Path <String>] [-WhatIf] -ZoneID <String>
[<CommonParameters>]
DESCRIPTION
Creates a config file to be used in conjunction with the other function in this module.
PARAMETERS
-ApiKey <String>
Global API Key on https://www.cloudflare.com/a/profile
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Domain <String>
The domain to use with the API
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Email <MailAddress>
The email address used to logon to Cloudflare
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Path <String>
Optional non default path to config file
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ZoneID <String>
The Zone ID of the domain to use with the API
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
Example 1
PS C:\\> New-CFConfig -Email 'email@example.com' -ApiKey 1234567890abcdef -Domain 'example.com'
Creates a new config file in the default location for the domain `example.com`
Example 2
PS C:\\> New-CFConfig -Email 'email@example.com' -ApiKey 1234567890abcdef -ZoneID abcdef1234567890
Creates a new config file in the deault location for the zone id `abcdef1234567890`
Example 3
PS C:\\> New-CFConfig -Email 'email@example.com' -ApiKey 1234567890abcdef -Domain 'example.net' -Path
'~\\CFExampleNet.xml'
Creates a new config file in a non-default location for the domain `example.net`
RELATED LINKS