Line Notify 發訊 with PHP

  1. 使用者必須先將 Line Notify 加入為好友
  2. 使用者瀏覽一個網頁,網頁中告知【點擊這裡】將您的帳號與 Line Notify 的本服務連結
  3. 瀏覽器導向 Line Notify 網站
  4. 使用者點擊後登入 Line 帳號並選擇要連結的聊天室或 1 對 1 聊天室
  5. Line Notify 網站 Call Back 回你的網站並交付 Access Token
  6. 使用該 Access Token 向 User Push Message


使用 Let's Encrypt 來作為 VDI - RDCB 憑證時更新 GPO 派送 Thumbprints 的處理

連接 RemoteAPP 或 VM 的時候會跳出以下訊息
A website is trying to run a RemoteApp Program. Make sure that you trust the publisher before you connect to run the program
This Remoteapp program could harm your local or remote computer.

已知這個必須以 GPO 派送 RDCB 憑證的 Thumbprints
GPO 設定路徑如下:
Windows Components\Remote Desktop Services\Remote Desktop Connection Client
>> Specify SHA1 thumbprints of certificates representing trusted .rdp publishers
但要使用 Let's Encrypt 這種兩、三個月就要更換一次憑證的免費方案的話
還要手動更新 GPO 設定中的指紋太麻煩了,於是找到相關的 PowerShell 指令可以用


Step-by-Step Guide for upgrading SYSVOL replication to DFSR (Distributed File System Replication)

This Article is not written by myself.
Just a backup in case of the original one might be offline someday.
All credit goes to http://www.rebeladmin.com

Origin URL:

SYSVOL is a folder shared by domain controller to hold its logon scripts, group policies and other items related to AD. All the domain controllers in network will replicate the content of SYSVOL folder. The default path for SYSVOL folder is %SystemRoot%\SYSVOL. This folder path can define when you install the active directory.

Windows Server 2003 and 2003 R2 uses File Replication Service (FRS) to replicate SYSVOL folder content to other domain controllers. But Windows server 2008 and later uses Distributed File System (DFS) for the replication.  DFS is more efficient than FRS. Since windows server 2003 is going out of support, most people already done or still looking for migrate in to latest versions. However migrating FSMO roles WILL NOT migrate SYSVOL replication from FRS to DFS. Most of the engineers forget about this step when they migrate from windows 2003 to new versions.

For FRS to DFS migration we uses the Dfsrmig.exe utility. More info about it available on https://technet.microsoft.com/en-au/library/dd641227(v=ws.10).aspx


Chrome 的 Command Mode (--headless) 進行 ScreenShot

使用 Chrome 的 Command Mode (--headless) 進行 ScreenShot 指令如下:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --headless --disable-gpu --run-all-compositor-stages-before-draw --aggressive-cache-discard --disable-notifications --disable-remote-fonts --disable-reading-from-canvas --disable-remote-playback-api --disable-shared-workers --disable-voice-input --enable-aggressive-domstorage-flushing --window-size=1024,768 --screenshot="C:\Temp\ScreenShot.png" "https://www.google.com"

這個指令在 cmd 視窗直接執行時沒有問題,可以取得圖檔
但是如果放到 Task Scheduler 裡面跑的時候卻無法取得圖檔

由於不知道怎麼查 Chrome 的 Log ,所以先朝打開 Log 著手
在以下網站查到了怎麼開 Log


PHP Webhook API Close Connection

Webhook API 一般希望在接收連線資料後盡速將連線中斷再去執行後面的其他運算
1. 先回應 200 ok
2. 取得 HTTP header
3. 取得送來的資料
4. 斷線


Hidden / Disable items in Windows 10 Settings App

微軟想用 Settings App 取代 Control Pannel
其中的一些設定項目必須用以下方式在 GPO 中設定才能隱藏起來

  1. Open the Local Group Policy Editor and then go to Computer SettingsAdministrative Templates, and then Control Panel.
  2. Double-click the Group Policy Settings Page Visibility option and then select Enable.
  3. Depending on your need, specify either a ShowOnly: or Hide: string.
    If you want to only show only Proxy and Ethernet, the string would be as follows:
To determine the URI of a Settings app page, look up the URI on the ms-settings: URI scheme reference page.


踩雷系列: Windows Server 2019 網卡設定 發生錯誤: Windows cannot access the specified device path or file


Settings -> Ethernet -> Change adapter options


Windows cannot access the specified device, path or file. You may not have the appropriate permission to access the item.

事實上如果開檔案總管自己輸入 Control Pannel 到舊式的網卡設定是沒問題的



Install SQL on Server Core

先用 Standard / Enterprise 版產生 ConfigurationFile.INI
*. Express 版本安裝 GUI 沒有一個 (Ready to Install 的步驟可以停下來產生 .ini 檔)
取得 ConfigurationFile.INI 後進行以下變更