2025-03-05

廣告、跟蹤、釣魚等過濾用 Public DNS Server

Server 不建議使用

AdGuard DNS(無過濾功能):
94.140.14.140
94.140.14.141

AdGuard DNS(攔截廣告、跟蹤器和釣魚網站)
94.140.14.14
94.140.15.15

AdGuard DNS(攔截廣告、跟蹤器、釣魚網站和成人內容的網站)
94.140.14.15
94.140.15.16

Cloudflare DNS(隱私權保護)
1.1.1.1
1.0.0.1

Cloudflare DNS (阻止惡意程式)
1.1.1.2
1.0.0.2

Cloudflare DNS (阻止惡意軟件及成人內容)
1.1.1.3
1.0.0.3

https://dns.sb/
185.222.222.222
45.11.45.11

2025-03-04

Create Microsoft Entra Application Service Principal for Connect-AzAccount

在 PowerShell 中用帳號密碼進行 Connect-AzAccount 會被罵

WARNING: Authentication with a username and password at the command line is strongly discouraged. Use one of the recommended authentication methods based on your requirements. For additional information, visit https://go.microsoft.com/fwlink/?linkid=2276971.

先用具有適當權限的帳號登入後用以下 Script 建立 Service Principal Application
再到 RBAC 賦予需要的權限

Set-Location -LiteralPath 'C:\Command\AzureConnect';

$AzureEntraTenantId = 'xxxxxxxx-xxxx-xxxx-xx-xxxxxxxxxxxx';
$AzSubscriptionID = 'xxxxxxxx-xxxx-xxxx-xx-xxxxxxxxxxxx';
$ServicePrincipalName = 'PowershellAutomaticProcess';
$CredentailFileName = ('AzConnect_' + $ServicePrincipalName + '.txt')
$CertificateExpired = 100;
#設定密碼 100 年後到期 (預設 1 年),往下找 AddYears 字串那邊可以改