2025年1月23日 星期四

GPO policy 設定預設應用程式﹝設定預設關聯設定檔﹞


建立xml設定檔,並將其啟用

Computer Configuration\Administrative Templates\Windows Components\File Explorer

設定檔內容將會新增到User電腦regedit機碼位址

HKLM\Software\Policies\Microsoft\Windows\System\DefaultAssociationsConfiguration



<?xml version="1.0" encoding="UTF-8"?>

<DefaultAssociations>

  <Association ApplicationName="Google Chrome" ProgId="ChromeHTML" Identifier=".htm"/>

  <Association ApplicationName="Google Chrome" ProgId="ChromeHTML" Identifier=".html"/>

  <Association ApplicationName="Google Chrome" ProgId="ChromeHTML" Identifier="http"/>

  <Association ApplicationName="Google Chrome" ProgId="ChromeHTML" Identifier="https"/>

</DefaultAssociations>

UBUNTU add user Terminal登入,路徑只顯示﹝$﹞提示字元及資料夾無顏色區分

當 UBUNTU 使用 useradd 指令新増帳號 Terminal登入,提示字元及資料夾都無顏色顯示區分。

可以將 /etc/skel/ 資料夾下的 .bashrc、.profile、.bash_logout 複製到該 user 帳號資料夾內。

1.修改檔案擁有者: chown xxxxx:xxxxx .bashrc .profile .bash_logout

2.修改 .bashrc 檔案 #force_color_prompt=yes 為 force_color_prompt=yes

3.user登入只顯示 $ 沒顯示user帳號名稱,修改 /etc/passwd  檔案

   user1:x:1000:1000:user1:/home/user1:/bin/bash

4.重新登入


UBUNTU 22.04 設定NTP校時

安裝 systemd-timesyncd 套件

apt install systemd-timesyncd

timedatectl set-ntp true

systemctl start systemd-timesyncd


檢查服務狀態

systemctl status systemd-timesyncd


修改設定檔 /etc/systemd/timesyncd.conf

vi /etc/systemd/timesyncd.conf

[Time]

NTP=x.x.x.x

#FallbackNTP=ntp.ubuntu.com

#RootDistanceMaxSec=5

#PollIntervalMinSec=32

#PollIntervalMaxSec=2048


重啟 systemd-timesyncd 服務

systemctl restart systemd-timesyncd


驗證設定

timedatectl show-timesync --all


再確認一次服務狀態

systemctl status systemd-timesyncd

應該可以看到己經向NTP server重新校時

2024年5月23日 星期四

Nutanix平台虛擬機(UBUNTU),利用Veeam備份移轉至VMware平台,安裝套件、系統更新出現錯誤

 mount: /var/lib/grub/esp: special device /dev/disk/by-id/scsi-SNUTANIX_VDISK_NFS_4_0_7672_2d41cbaa_025e_4fac_849c_9e620eff5bff-part1 does not exist.
Errors were encountered while processing:
 grub-efi-amd64-signed
 shim-signed

出現上面的訊息,可以試著刪除config.dat cache檔案:

sudo rm /var/cache/debconf/config.dat

再執行 sudo dpkg --configure -a 試試能否解決問題。


移除 nutanix guest tools:

sudo python3 /usr/local/nutanix/ngt/python/bin/uninstall_ngt.py


UBUNTU系統更新 apt update && apt upgrade 出現錯誤訊息:
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.

編輯 .bashrc 檔案,在第1行增加:export  GNUTLS_CPUID_OVERRIDE=0x1


停用VEEAM備份軟體服務:
sudo systemctl stop veeamtransport.service veeamdeployment.service

sudo systemctl disable veeamtransport.service veeamdeployment.service


2023年11月17日 星期五

ManageEngine EventLog Analyzer版本更新步驟



先將下載的更新檔上傳到主機裡,再進行下列動作。

切換到 ManageEngine EventLog Analyzer 安裝目錄:
                                                  cd /opt/ManageEngine/EventLog/bin

接著停止EventLog Analyzer服務:
                                                   sudo ./shutdown.sh

EventLog Analyzer服務停止後,執行:
                                                    sudo ./UpdateManager.sh -c

Press i to  Install
      c to  Import Certificate
      v to  View installed ServicePack versions
      e to  Exit
Choose an Option:i

選擇「i」 輸入更新檔路徑進行 PPM更新檔安裝程序:
Enter the patch file to install:/home/xxxxx/ManageEngine_EventLog_Analyzer_12_3_0_SP-12_3_2_8.ppm

更新完成,需要重新啟動服務:
                                                       sudo systemctl start eventloganalyzer
確認一下服務是否正常啟動:
                                                       sudo systemctl status eventloganalyzer

2023年10月11日 星期三

GPO 派送 Powershell script 關閉 Windows 10、11 Wi-Fi 「隨機硬體位址」

適用環境:

Wi-Fi 連線需要固定 Mac Address 位址


缺點:

利用 Wi-Fi 連線,送出的 Mac Address 都是實體位址,不會再隨機產生新的 Mac Address。


作法:

電腦開機登入系統時,執行 Powershell script 取得 Wi-Fi 的實體 Mac Address,再將取得的 Mac Address 寫入機碼。


設定 GPO:

1.將 Script 放入 \\AD_Domain\netlogon 裡。

2.設定GPO Policy 


其他 GPO 項目的設定值,可以自行參考作者文章,測試是否需要調整。

參考文章及引用:

1. Script to Disable "Use Random MAC Addresses" for wifi : r/SCCM (reddit.com)

2. Running PowerShell Startup (Logon) Scripts Using GPO | Windows OS Hub (woshub.com)

2023年3月9日 星期四

利用GPO或CMD關閉Windows 11 工具列小圖示

指令方式調整工具列圖示:

搜尋:

reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v SearchboxTaskbarMode /t REG_DWORD /d 0 /f

工作檢視:

reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton /t REG_DWORD /d 0 /f

聊天:

reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarMn /t REG_DWORD /d 0 /f

小工具:

reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarDa /t REG_DWORD /d 0 /f


GPO方式調整工具列圖示:

將上面的路徑轉換為GPO方式統一派送到使用者電腦



GPO policy 設定預設應用程式﹝設定預設關聯設定檔﹞

建立xml設定檔,並將其啟用 Computer Configuration\Administrative Templates\Windows Components\File Explorer 設定檔內容將會新增到User電腦regedit機碼位址 HKLM\Software\Po...