40號桌。
在等待慣性遲到的她抵達之前,先見到的竟是我相依為命的母親。母親在那套著縫縫補補椅套的桌前坐了下來,我問:「待會兒她來了,妳是要去樓上吃飯還是先回家?」母親眼睛咕溜溜地轉了一下,停了半晌:「我先回去好了。」登時心中五味雜陳:『我沒有趕妳回去的意思呀。』
就在母親起身時,貌似老年癡呆的感覺襲上心頭,而遠處見到她正向這裡走來。於是夢醒了,沒有見著她長得什麼模樣,臉是一團模糊的馬賽克。
『嘛,還好只是個夢』
40號桌。
在等待慣性遲到的她抵達之前,先見到的竟是我相依為命的母親。母親在那套著縫縫補補椅套的桌前坐了下來,我問:「待會兒她來了,妳是要去樓上吃飯還是先回家?」母親眼睛咕溜溜地轉了一下,停了半晌:「我先回去好了。」登時心中五味雜陳:『我沒有趕妳回去的意思呀。』
就在母親起身時,貌似老年癡呆的感覺襲上心頭,而遠處見到她正向這裡走來。於是夢醒了,沒有見著她長得什麼模樣,臉是一團模糊的馬賽克。
『嘛,還好只是個夢』
需搭配 Connect-AzAccount with Saved Encryped Credential in Powershell 實現自動化
Param (
[String]$VMName = ''
);
if ($VMName -eq '') {
exit;
};
Set-Location -Path ('C:\ChangeVMPublicIP');
if (Test-Path -Path (($VMName) + '.Lock')) {
if ((Get-Date) -lt (Get-Item -Path (($VMName) + '.Lock')).LastWriteTime.AddMinutes(5)) {
write-Host 'VM Locked';
exit;
};
};
$VMName | Out-File (($VMName) + '.Lock');
$CredentailFileName = 'AzCredential.txt';
$AzSubscriptionID = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
$StringLength = 0;
foreach ($Word in ($String -Split '')) {
if ([System.Text.Encoding]::UTF8.GetByteCount($Word) -gt 1) {
$StringLength += 2;
} else {
$StringLength += [System.Text.Encoding]::UTF8.GetByteCount($Word);
};
};
PowerShell Escape HTML Code UrlEncode
[URI]::EscapeUriString($URL);
$PSDefaultParameterValues=@{
"*-ADGroupMember:Server"="DC01.Contoso.com"
}
Add-ADGroupMember -Identity "GroupName" -Members "Dino9021"
Reference:
近幾個月微軟更新雲端服務,幾乎各種連線都開始只支援 TLS 1.2
如果還沒更新或開啟的話就會出現各種連不上、帳號驗證失敗等等問題
參考微軟說明開啟即可
Update to enable TLS 1.1 and TLS 1.2 as default secure protocols in WinHTTP in Windows
上述網頁中的 EasyFix 直連按這裡
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
If (-Not (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319')) {
New-Item 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Force | Out-Null;
};
Computer Configuration (Enabled)
=> Policies
=> => Windows Settings
=> => => Scripts
=> => => => Startup
=> => => => => StoreBitlockerRecoveryRasswordToAD.ps1
=======================================================
ACL Add Allow Domain Computers to Read and Execute
=======================================================
$keyID = Get-BitLockerVolume -MountPoint c: | select -ExpandProperty keyprotector | where {$_.KeyProtectorType -eq 'RecoveryPassword'};
if ($keyID.KeyProtectorId -ne $Null) {
Backup-BitLockerKeyProtector -MountPoint c: -KeyProtectorId $keyID.KeyProtectorId;
};
=======================================================
User 在登入 Azure Virtual Desktop 的時候出現無法掛載 User Profile Disk 的問題
經過檢查該 User 沒有任何殘留的 Session 在同一個 Host Pool 的任何一台 Session Host 上
思考方向是 User Profile Disk 在某個 Sign-out event 沒有被正常 Detached 導致 Open File 的問題
以 PoweShell 先登入 Azure Account
Connect-AzAccount
選取可管理該 User Profile Disk 所存放 Storage Account 的 Subscription
Select-AzSubscriptionSelect -subscriptionid 'oooooo-xxxxx-oooo-oooo-xxxxxxx'
Line Bot 發送圖片需要有各種解析度的 URL
但若要產生各種解析度的圖片會耗費太多時間造成 Timeout
所以直接寫 Rewrite 到最高解析度的圖片 URL 就好
寫在 Virtual Host 段
如果有多個不同路徑都會用到相同功能可以寫多個 Directory
<VirtualHost *:80>
<Directory "${SITEROOT}/www.contoso.com/image">
<IfModule rewrite_module>
RewriteEngine On