mirror of
https://dev.azure.com/effectory/Survey%20Software/_git/Cloud%20Engineering
synced 2026-02-27 18:52:18 +01:00
Merged PR 59542: list storage blobs and tables & servicebus list scrip
- Added servicebus list script #117926 - Added scripts to list storage blobs and tables #115638 Related work items: #117926
This commit is contained in:
40
Powershell/Tools/DNS verification/DNS.csv
Normal file
40
Powershell/Tools/DNS verification/DNS.csv
Normal file
@@ -0,0 +1,40 @@
|
||||
"HostName","Fqdn","CName","IpAddress","CNameChain","Exists","RegisteredInExternalDNS","Owner","Comment"
|
||||
"status","status.effectory.com","statuspage.betteruptime.com","167.235.220.62"," -> statuspage.betteruptime.com","True","True","TO",""
|
||||
"enterpriseregistration","enterpriseregistration.effectory.com","enterpriseregistration.windows.net","40.126.53.23 20.190.181.21 20.190.181.22 20.190.181.19 40.126.53.2 40.126.53.1 40.126.53.3 40.126.53.5"," -> enterpriseregistration.windows.net -> na.privatelink.msidentity.com -> prdf.aadg.msidentity.com -> www.tm.f.prd.aadg.trafficmanager.net","True","True","Int-Aut",""
|
||||
"mailjetgo","mailjetgo.effectory.com","r.mailjet.com","35.241.186.140"," -> r.mailjet.com","True","True","TO",""
|
||||
"hs1-27043721._domainkey","hs1-27043721._domainkey.effectory.com","effectory-com.hs16a.dkim.hubspotemail.net",""," -> effectory-com.hs16a.dkim.hubspotemail.net","False","True","Int-Aut",""
|
||||
"hs2-27043721._domainkey","hs2-27043721._domainkey.effectory.com","effectory-com.hs16b.dkim.hubspotemail.net",""," -> effectory-com.hs16b.dkim.hubspotemail.net","False","True","Int-Aut",""
|
||||
"sip","sip.effectory.com","sipdir.online.lync.com","","","False","False","Int-Aut",""
|
||||
"wiki","wiki.effectory.com","effectorysupport.zendesk.com","216.198.54.1 216.198.53.1"," -> effectorysupport.zendesk.com","True","True","Int-Aut",""
|
||||
"pki","pki.effectory.com","pkieffectory.azurewebsites.net","20.105.216.25"," -> pkieffectory.azurewebsites.net -> waws-prod-am2-635.sip.azurewebsites.windows.net -> waws-prod-am2-635-518a.westeurope.cloudapp.azure.com","True","True","Int-Aut",""
|
||||
"lyncdiscover","lyncdiscover.effectory.com","webdir.online.lync.com","","","False","False","Int-Aut",""
|
||||
"autodiscover","autodiscover.effectory.com","autodiscover.outlook.com","40.99.204.200 52.97.163.8 52.97.201.104 40.99.204.104"," -> autodiscover.outlook.com -> atod-g2.tm-4.office.com","True","True","Int-Aut",""
|
||||
"jobs","jobs.effectory.com","secure.recruitee.com","35.242.209.60"," -> secure.recruitee.com","True","True","Int-Aut",""
|
||||
"www.jobs","www.jobs.effectory.com","secure.recruitee.com","35.242.209.60"," -> secure.recruitee.com","True","True","Int-Aut",""
|
||||
"rds","rds.effectory.com","rds-effectory12.msappproxy.net","172.172.255.228"," -> rds-effectory12.msappproxy.net -> cwap-nam1-runtime.routing.msappproxy.net -> nam.proxy-3.appproxy.msidentity.com -> www.tm.nam.proxy-3.appproxy.trafficmanager.net","True","True","Int-Aut",""
|
||||
"security","security.effectory.com","effectory.portals.safebase.io","104.18.5.130 104.18.4.130"," -> effectory.portals.safebase.io","True","True","Int-Aut",""
|
||||
"qualys","qualys.effectory.com","qualysguard.qg2.apps.qualys.eu","162.159.152.21 162.159.153.243"," -> qualysguard.qg2.apps.qualys.eu","True","True","Int-Aut",""
|
||||
"go","go.effectory.com","27043721.sites.hscoscdn-eu1.net","141.101.90.98 141.101.90.99 141.101.90.96 141.101.90.97"," -> 27043721.sites.hscoscdn-eu1.net","True","True","Int-Aut",""
|
||||
"eurkey1._domainkey","eurkey1._domainkey.effectory.com","eurkey1effectorycom.k01.dyn365mktg.com",""," -> eurkey1effectorycom.k01.dyn365mktg.com","False","True","Int-Aut",""
|
||||
"eurkey2._domainkey","eurkey2._domainkey.effectory.com","eurkey2effectorycom.k01.dyn365mktg.com",""," -> eurkey2effectorycom.k01.dyn365mktg.com","False","True","Int-Aut",""
|
||||
"bouncing","bouncing.effectory.com","eur.pb-dynmktge.com","72.145.44.93"," -> eur.pb-dynmktge.com","True","True","Int-Aut",""
|
||||
"enterpriseenrollment","enterpriseenrollment.effectory.com","enterpriseenrollment-s.manage.microsoft.com","20.91.147.72"," -> enterpriseenrollment-s.manage.microsoft.com -> manage-pe.trafficmanager.net -> pexsucpeu02.westeurope.cloudapp.azure.com","True","True","Int-Aut",""
|
||||
"support","support.effectory.com","effectory.zendesk.com","216.198.54.1 216.198.53.1"," -> effectory.zendesk.com","True","True","Int-Aut",""
|
||||
"solutions","solutions.effectory.com","custom-tracking.salesloft.com","54.209.38.112 3.230.235.194 3.218.43.255"," -> custom-tracking.salesloft.com","True","True","Int-Aut",""
|
||||
"zendesk1._domainkey","zendesk1._domainkey.effectory.com","zendesk1._domainkey.zendesk.com",""," -> zendesk1._domainkey.zendesk.com","False","True","Int-Aut",""
|
||||
"track","track.effectory.com","mandrillapp.com","76.223.125.47 15.197.175.4"," -> mandrillapp.com","True","True","TO",""
|
||||
"selector1._domainkey","selector1._domainkey.effectory.com","selector1-effectory-com._domainkey.effectory12.onmicrosoft.com","","","False","False","Int-Aut",""
|
||||
"elink","elink.effectory.com","elink-eu.azuresend.com",""," -> elink-eu.azuresend.com -> azuresendeventseu.cloudapp.net","False","True","Int-Aut",""
|
||||
"zendesk2._domainkey","zendesk2._domainkey.effectory.com","zendesk2._domainkey.zendesk.com",""," -> zendesk2._domainkey.zendesk.com","False","True","Int-Aut",""
|
||||
"servicedesk","servicedesk.effectory.com","servicedesk-effectory12.msappproxy.net","172.172.255.228"," -> servicedesk-effectory12.msappproxy.net -> cwap-nam1-runtime.routing.msappproxy.net -> nam.proxy-3.appproxy.msidentity.com -> www.tm.nam.proxy-3.appproxy.trafficmanager.net","True","True","Int-Aut",""
|
||||
"selector2._domainkey","selector2._domainkey.effectory.com","selector2-effectory-com._domainkey.effectory12.onmicrosoft.com",""," -> selector2-effectory-com._domainkey.effectory12.onmicrosoft.com","False","True","Int-Aut",""
|
||||
"zendesk1","zendesk1.effectory.com","mail1.zendesk.com","216.198.54.2 216.198.53.2"," -> mail1.zendesk.com","True","True","Int-Aut",""
|
||||
"pm-bounces.notifications.security","pm-bounces.notifications.security.effectory.com","pm.mtasv.net","3.135.172.178 3.20.18.133 3.143.47.38"," -> pm.mtasv.net","True","True","Int-Aut",""
|
||||
"analytics","analytics.effectory.com","effectory.piwik.pro","20.93.211.47"," -> effectory.piwik.pro -> pp-public-p-euw.piwik.pro","True","True","Int-Aut",""
|
||||
"zendesk2","zendesk2.effectory.com","mail2.zendesk.com","216.198.54.2 216.198.53.2"," -> mail2.zendesk.com","True","True","Int-Aut",""
|
||||
"bnc3","bnc3.effectory.com","bnc3.mailjet.com","35.195.220.65"," -> bnc3.mailjet.com","True","True","Int-Aut",""
|
||||
"zendesk3","zendesk3.effectory.com","mail3.zendesk.com","216.198.54.2 216.198.53.2"," -> mail3.zendesk.com","True","True","Int-Aut",""
|
||||
"sts3","sts3.effectory.com","effectory-adfs-proxy.westeurope.cloudapp.azure.com","10.18.2.20"," -> effectory-adfs-proxy.westeurope.cloudapp.azure.com","True","True","Int-Aut",""
|
||||
"zendesk4","zendesk4.effectory.com","mail4.zendesk.com","216.198.54.2 216.198.53.2"," -> mail4.zendesk.com","True","True","Int-Aut",""
|
||||
"helpdeskinternetspiegel","helpdeskinternetspiegel.effectory.com","support.effectory.com","216.198.53.1 216.198.54.1"," -> support.effectory.com -> effectory.zendesk.com","True","True","Int-Aut",""
|
||||
"msoid","msoid.effectory.com","clientconfig.microsoftonline-p.net","20.190.159.75 20.190.159.71 40.126.31.130 20.190.159.73 20.190.159.128 40.126.31.69 20.190.159.2 40.126.31.1"," -> clientconfig.microsoftonline-p.net -> a.privatelink.msidentity.com -> prda.aadg.msidentity.com -> www.tm.a.prd.aadg.akadns.net","True","True","Int-Aut",""
|
||||
|
112
Powershell/Tools/DNS verification/DNSCheck.ps1
Normal file
112
Powershell/Tools/DNS verification/DNSCheck.ps1
Normal file
@@ -0,0 +1,112 @@
|
||||
class HostCheck {
|
||||
[string] $HostName = ""
|
||||
[string] $Fqdn = ""
|
||||
[string] $CName = ""
|
||||
[string] $IpAddress = ""
|
||||
[string] $CNameChain = ""
|
||||
[bool] $Exists = $false
|
||||
[bool] $RegisteredInExternalDNS = $false
|
||||
[string] $Owner = ""
|
||||
[string] $Comment = ""
|
||||
}
|
||||
|
||||
function HostExistsInExternal ([HostCheck] $hostCheck, [string] $ExternalDNSServer) {
|
||||
try {
|
||||
$CnameChain = resolve-dnsname -name $hostCheck.Fqdn -NoHostsFile -Server $ExternalDNSServer -ErrorAction Ignore
|
||||
|
||||
for ($i = 0; $i -lt $CnameChain.Count; $i++) {
|
||||
$chainItem = $CnameChain[$i]
|
||||
if ($chainItem.NameHost) {
|
||||
$hostCheck.CNameChain = "$($hostCheck.CNameChain) -> $($chainItem.NameHost)"
|
||||
if ($chainItem.NameHost -ieq $hostCheck.CName) {
|
||||
$hostCheck.RegisteredInExternalDNS = $true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$hostCheck.RegisteredInExternalDNS = $false
|
||||
}
|
||||
|
||||
return $hostCheck
|
||||
}
|
||||
|
||||
function GetIPAddress ([HostCheck] $hostCheck) {
|
||||
try {
|
||||
$hostAddresses = [System.Net.Dns]::GetHostAddresses($hostCheck.Fqdn)
|
||||
$hostCheck.IpAddress = $hostAddresses.IPAddressToString
|
||||
|
||||
}
|
||||
catch {
|
||||
try {
|
||||
$hostAddresses = [System.Net.Dns]::GetHostAddresses($hostCheck.HostName)
|
||||
|
||||
$hostCheck.IpAddress = $hostAddresses.IPAddressToString
|
||||
}
|
||||
catch {
|
||||
$hostCheck.IpAddress = ""
|
||||
}
|
||||
|
||||
}
|
||||
return $hostCheck
|
||||
}
|
||||
|
||||
function TestIPConnection ([HostCheck] $hostCheck) {
|
||||
try {
|
||||
if (Test-Connection -TargetName $hostCheck.IpAddress -Count 1 -Quiet) {
|
||||
$hostCheck.Exists = $true
|
||||
}
|
||||
else {
|
||||
$hostCheck.Exists = $false
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$hostCheck.Exists = $false
|
||||
}
|
||||
return $hostCheck
|
||||
}
|
||||
|
||||
function Effectory-DNSVerify-Csv ([string[]] $FileName, [string] $ExternalDNSServer = "8.8.8.8") {
|
||||
Clear-DnsClientCache
|
||||
|
||||
$DNSRecords = import-csv $FileName
|
||||
|
||||
# HostName,Cname,Fqdn
|
||||
# accept-authorization,authorization-web-api-accept.azurewebsites.net,accept-authorization.effectory.com
|
||||
# accept-customer,test-customer-effectory-accept.azurewebsites.net,accept-customer.effectory.com
|
||||
# accept-ecestore,test-ecestore-accept.azurewebsites.net,accept-ecestore.effectory.com
|
||||
|
||||
[HostCheck[]]$Result = @()
|
||||
foreach ($DNSRecord in $DNSRecords) {
|
||||
|
||||
[HostCheck] $hostCheck = [HostCheck]::new()
|
||||
$hostCheck.HostName = $DNSRecord.ExternalDNS
|
||||
$hostCheck.CName = $DNSRecord.To
|
||||
$hostCheck.Owner = $DNSRecord.Owner
|
||||
$hostCheck.Comment = $DNSRecord.Comment
|
||||
$hostCheck.Fqdn = "$($DNSRecord.ExternalDNS).effectory.com"
|
||||
|
||||
$hostCheck = HostExistsInExternal -hostCheck $hostCheck -ExternalDNSServer $ExternalDNSServer
|
||||
$hostCheck = GetIPAddress -hostCheck $hostCheck
|
||||
$hostCheck.Exists = $hostCheck.IpAddress -ne ""
|
||||
|
||||
$Result += $hostCheck
|
||||
}
|
||||
|
||||
return $Result
|
||||
}
|
||||
|
||||
|
||||
#Connect-AzAccount
|
||||
|
||||
#Effectory-DNSVerify -ZoneName "effectory.com" -DNSServer "DC1.effectory.local" -ExternalDNSServer "8.8.8.8" | Export-Csv -Path ".\2021-06-01 DNS-effectory-com.csv"
|
||||
#Effectory-DNSVerify -ZoneName "effectory.local" -DNSServer "DC1.effectory.local" -ExternalDNSServer "DC2.effectory.local" -DoIpCheck $true | Export-Csv -Path ".\2021-06-01 DNS-effectory-local.csv"
|
||||
#Effectory-DNSVerify-Csv -FileName .\vip-effectory-com.csv -ExternalDNSServer "8.8.8.8" | Export-Csv -Path ".\2021-06-01 DNS-vip-effectory-com.csv"
|
||||
#Effectory-GetAppServiceHostNames | Export-Csv -Path ".\2021-06-01 AppService Hosts.csv"
|
||||
#Effectory-GetFrontDoorHostNames | Export-Csv -Path ".\2021-06-01 FrontDoor Hosts.csv"
|
||||
|
||||
# | Format-Table
|
||||
# | Export-Csv -Path .\DNS-xxxx.csv
|
||||
|
||||
$foo = Effectory-DNSVerify-Csv -FileName "C:\tmp\Book3.csv"
|
||||
$foo | Export-Csv -Path .\DNS.csv
|
||||
Reference in New Issue
Block a user