This Powershell module allows you to do some basic DNS operations on Aliyun DNS.\ Including query, create, edit and remove any dns records on Aliyun DNS.
PS Version | Compatibility |
---|---|
5.1 | :heavy_check_mark: |
5.0 | :heavy_check_mark: |
4.0 | :heavy_check_mark: |
3.0 | :heavy_check_mark: |
2.0 | :x: |
To use this module
%USERPROFILE%\Documents\WindowsPowershell\Modules\
config.json
file under the 'AliyunDNS' folder.
Add the AccessKeyId
and AccessKeySecret
value to the file.\
Note: You should get these two values from Aliyun Admin Panel or ask your DNS administrator.Set-ExecutionPolicy Unrestricted
Execute the folloing powershell command to start using the module and then have fun!:smile:
Import-Module AliyunDNS
Get-AliyunDNSRecord
[Mandatory]-Doamin <DomainName>
[Mandatory]-RecordId <RecordId>
[Mandatory]-SubDomain <SubDomainName>
-PageNumber <PageNo>
-PageSize <PageSize>
-Type <RecordType>
Note: You can only pass one of the mandatory parameters above.
New-AliyunDNSRecord
[Mandatory]-DomainName <DomainName>
[Mandatory]-RR <Host>
[Mandatory]-Type <RecordType>
[Mandatory]-Value <RecordValue>
-TTL <TTL>
-Priority <Priority>
-Line <Line>
Update-AliyunDNSRecord
[Mandatory]-RecordId <RecordId>
[Mandatory]-RR <Host>
[Mandatory]-Type <RecordType>
[Mandatory]-Value <RecordValue>
-TTL <TTL>
-Priority <Priority>
-Line <Line>
Set-AliyunDNSRecordStatus
[Mandatory]-RecordId <RecordId>
[Mandatory]-Status <Status>
Remove-AliyunDNSRecord
[Mandatory]-RecordId <RecordId>
Get-AliyunDomain
-DomainName <DomainName>
-WhoIs <$True|$False>
Get-AliyunDomain
-PageNumber <PageNumber>
-PageSize <PageSize>
Get-AliyunDomainLogs
-PageNumber <PageNumber>
-PageSize <PageSize>
-KeyWord <Keyword>
Get-MainDomain
-InputString <HostName>
For more information, please use help <Command>
阿里云DNS powershell模块用于进行基本的云解析操作,例如查询,新建,编辑,删除记录等
Powershell版本 | 兼容性 |
---|---|
5.1 | :heavy_check_mark: |
5.0 | :heavy_check_mark: |
4.0 | :heavy_check_mark: |
3.0 | :heavy_check_mark: |
2.0 | :x: |
按照下面的步骤进行安装
%USERPROFILE%\Documents\WindowsPowershell\Modules\
config.json
文件。\
添加AccessKeyId
和AccessKeySecret
的值。\
注意: 你可以从阿里云的管理员中心获得这两个值,或者向你的DNS管理员寻求帮助。Set-ExecutionPolicy Unrestricted
执行以下指令以导入此模块,然后就可以愉快的使用了!:smile:
Import-Module AliyunDNS
Get-AliyunDNSRecord
[Mandatory]-Doamin <DomainName>
[Mandatory]-RecordId <RecordId>
[Mandatory]-SubDomain <SubDomainName>
-PageNumber <PageNo>
-PageSize <PageSize>
-Type <RecordType>
注意: 在这个命令中你只允许传入一个强制参数。
New-AliyunDNSRecord
[Mandatory]-DomainName <DomainName>
[Mandatory]-RR <Host>
[Mandatory]-Type <RecordType>
[Mandatory]-Value <RecordValue>
-TTL <TTL>
-Priority <Priority>
-Line <Line>
Update-AliyunDNSRecord
[Mandatory]-RecordId <RecordId>
[Mandatory]-RR <Host>
[Mandatory]-Type <RecordType>
[Mandatory]-Value <RecordValue>
-TTL <TTL>
-Priority <Priority>
-Line <Line>
Set-AliyunDNSRecordStatus
[Mandatory]-RecordId <RecordId>
[Mandatory]-Status <Status>
Remove-AliyunDNSRecord
[Mandatory]-RecordId <RecordId>
Get-AliyunDomain
-DomainName <DomainName>
-WhoIs <$True|$False>
Get-AliyunDomain
-PageNumber <PageNumber>
-PageSize <PageSize>
Get-AliyunDomainLogs
-PageNumber <PageNumber>
-PageSize <PageSize>
-KeyWord <Keyword>
Get-MainDomain
-InputString <HostName>
更多帮助信息请使用help <Command>
查询