前幾天某一外點同事發問說『為什麼無法連到伺服器的共享資料夾?』一時間還以為是網路設定跑掉了;但在重新設定後 ( netsh ),狀況依然。他還提到一個點『一台電腦可以、另一台不行』!
想起他不能連線的電腦的ip是屬於某一個分享器的,針對那台分享器去測試後發現某些帳號可以 (管理者帳號),某些帳號不行;可是在另一台卻是完全可以的。在向廠商求救後,廠商給予了大概可以進行的檢查:ip設定、port轉送的問題。再把可以的那台ip範圍給也在不行的那台測試後,就可以正常使用了。原來一切原因是 ip衝突 的關係,ip衝突也不會有任何警告,真是一個要注意的地方。
MIS 不是萬能與全知,但我們處於有谷哥神可以拜的世代,網路上給的資訊不一定能解決100%,但至少有6成以上是可用的,接下來補齊4成左右,事情就解決啦!提供一些在工作上會碰到的問題和事情的解法,給大家做個參考,謝謝大家!
2019年8月23日 星期五
2019年8月14日 星期三
【伺服器】如何修復 Server 2008
原始參考文章來源:https://www.dell.com/support/article/tw/zh/twdhs1/sln167714/windows-server-%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E5%BC%95%E5%AF%BC%E6%96%87%E4%BB%B6%E5%9C%A8windows-server2008%E6%88%962008r2%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8D%E5%90%AF%E5%8A%A8?lang=zh
最近公司的伺服器又開不起來,依照 Dell 的教學方式在第一次掛點時可以正常的依文件裡的指示操作;but,人生就是這個 but 這次怎麼按 "修復選項" 也沒有用。
詢問伺服器續簽的廠商說『由於最先不是不找他們簽約,現在這個問題沒辦法幫忙,請問微軟…』(看來只剩下換硬碟的功能,下次乾脆錢省下來,除了主要的那台,其他的自己修)
想說怎麼進個指令模式 (command prompt) 怎麼這麼難,開機後按F8一直都進不了 (當時有接外接硬碟),後來拔掉外接硬碟後,以原本的系統重開機就能以安全模式+指令模式的方式來操作…。
在第11步驟時,由於 copy f:\BootMgr c:\ 是為了要確認 c:\ 下面的檔案在不在而不是要覆蓋,但我不小心的按到 Y ,當場有點傻眼。接下來的步驟 bootrec 的指令都無法用...(應該是用修復光碟開機才會有的指令)。索性直接重開機試試,沒有想到就正常了…還好!
原始參考文章來源:https://www.dell.com/support/article/tw/zh/twdhs1/sln167714/windows-server-%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E5%BC%95%E5%AF%BC%E6%96%87%E4%BB%B6%E5%9C%A8windows-server2008%E6%88%962008r2%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8D%E5%90%AF%E5%8A%A8?lang=zh
===========文章來源備份(Dell網站) 分隔線=======================

Figure 1: Illustration of Drive lettering in Windows and WinRE (English only)Note: If there is no System Reserved partition. It is okay to select the drive containing the Windows folder.
Restoring Boot Files
Note: The media can be a CD, DVD, or USB storage device

Figure 2: DiskPart result (english only)

Figure 3: Result when no OS is found (English only)
This means that one of the following is true:
最近公司的伺服器又開不起來,依照 Dell 的教學方式在第一次掛點時可以正常的依文件裡的指示操作;but,人生就是這個 but 這次怎麼按 "修復選項" 也沒有用。
詢問伺服器續簽的廠商說『由於最先不是不找他們簽約,現在這個問題沒辦法幫忙,請問微軟…』(看來只剩下換硬碟的功能,下次乾脆錢省下來,除了主要的那台,其他的自己修)
想說怎麼進個指令模式 (command prompt) 怎麼這麼難,開機後按F8一直都進不了 (當時有接外接硬碟),後來拔掉外接硬碟後,以原本的系統重開機就能以安全模式+指令模式的方式來操作…。
在第11步驟時,由於 copy f:\BootMgr c:\ 是為了要確認 c:\ 下面的檔案在不在而不是要覆蓋,但我不小心的按到 Y ,當場有點傻眼。接下來的步驟 bootrec 的指令都無法用...(應該是用修復光碟開機才會有的指令)。索性直接重開機試試,沒有想到就正常了…還好!
原始參考文章來源:https://www.dell.com/support/article/tw/zh/twdhs1/sln167714/windows-server-%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E5%BC%95%E5%AF%BC%E6%96%87%E4%BB%B6%E5%9C%A8windows-server2008%E6%88%962008r2%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8D%E5%90%AF%E5%8A%A8?lang=zh
===========文章來源備份(Dell網站) 分隔線=======================
Windows Server: How to Repair the Boot Files in Windows Server 2008 or 2008 R2 if the Server Won't Boot
There are a number of possible causes for the failure of a server to boot into Windows. This article deals with a problem in the boot files and demonstrates how to repair them.
Introduction
When booting to the Windows Recovery Environment (WinRE), the drive letters are assigned on a first-come, first-serve basis. For example, the C: drive in Windows will often have a different letter in WinRE. The DiskPart utility can be used to keep track of the drives and what is stored on them.
- First Partition: 100 MB System Reserved (No drive letter)
- Second Partition: 60 GB (C:) OS
- Third Partition: 1.5 TB (D:) Data
- DVD Drive: E:

Figure 1: Illustration of Drive lettering in Windows and WinRE (English only)Note: If there is no System Reserved partition. It is okay to select the drive containing the Windows folder.
Restoring Boot Files
Note: The media can be a CD, DVD, or USB storage device

Figure 2: DiskPart result (english only)

Figure 3: Result when no OS is found (English only)
This means that one of the following is true:
- Boot to the Windows Server DVD.
- Open the command prompt.
- Server 2008 R2:
- If no driver is needed, press Shift-F10 to open the command prompt.
- Continue with step 3.
- Server 2008 (or 2008 R2 if a driver is required)
- Click Next at the first screen.
- Click Repair your computer.
- If no driver is needed, click Next and proceed to step vii below.
- If a driver is needed, click Load Drivers.
- Insert the media containing the needed driver.
- Navigate to the folder containing the driver, select it, and click Open.
- Click Command Prompt.
- The command prompt appears.
- Type DiskPart at the command prompt.
- Type List vol at the DiskPart prompt.
- Write down the drive letter of the DVD drive. In this example, it is F.
- Write down the drive letter of the system reserved drive. In this example, it is C.
- Type Select vol 1 (assuming volume 1 is the System Reserved volume, as it is here).
- Type active. This sets the selected volume as active.
- Type exit to return to the command line.
- Type Copy f:\BootMgr c:\ at the command prompt. One of two things will happen:
- If the file Bootmgr already exists on C:, type N to avoid overwriting it.
- If the file Bootmgr doesn't already exist on C:, it will automatically be copied.
- Type Bootrec /Fixmbr at the command prompt.
- Type Bootrec /Fixboot at the command prompt.
- Type Bootrec /rebuildBCD at the command prompt.
- If no OS is found, the following appears:
- The boot configuration database (BCD) already exists.
- The OS is not there.
- The OS is damaged beyond the ability of BootRec to recognize it.
- If BootRec /RebuildBCD succeeds, it will list any installations of Windows that it found. Press Y to accept and add them to the BCD.
- The server is now configured to boot from the proper partition. Close the command prompt and reboot the system into normal mode.
2019年6月19日 星期三
【VirtualBox】如何改變硬碟大小(xp不適用)
使用CloneVDI.exe:https://dotblogs.com.tw/cloudio/2010/01/31/13415
CloneVDI下載:https://forums.virtualbox.org/viewtopic.php?f=6&t=22422&start=0&sid=5e826600cba95ff9d94ea283a3924a69
影片教學:https://www.youtube.com/watch?v=4kYb5um163U
備註:
- 如果是xp的vm,在使用後,空間不會變大,但還是佔硬碟空間。
- 如果是其他系統,最好選擇不同的GUID,不然空間仍然不會變大。
2019年6月11日 星期二
[系統]如何設定遠端桌面最大連線數?
有一天,突然遇到了遠端桌面同一時間連線數量的問題,憑著印象記得似乎網路上有人討論過,所以就去搜尋一下:
https://community.dynamics.com/365/b/dynamics365enterprisecloudfronts/archive/2018/01/09/setup-simultaneous-remote-login-for-multiple-users
https://community.dynamics.com/365/b/dynamics365enterprisecloudfronts/archive/2018/01/09/setup-simultaneous-remote-login-for-multiple-users
- gpedit.msc 開啟 "本機群組原則編輯器"
- 電腦設定→系統管理範本→Windows元件→遠端桌面服務→遠端桌面工作階段主機→連線→限制連線數目
- 把上方的 "已啟用" 打開,並在下面的選項「允許的 RD 連線數目上限」設成同時可以連線的數目。
2019年5月27日 星期一
【伺服器】在 Linux 環境中用 Samba 架設 AD 伺服器
原本想要用 2012 或 2008 來架 AD 伺服器的 (需要授權費),但在網路上搜尋後,有找到除了一般的 Windows 安裝外,也可以用 Linux 中的 Samba 4 來架免授權費的 AD 伺服器
- 架 AD 伺服器:https://forum.7g-sogo.com/viewtopic.php?t=56
- 架 Printer 伺服器:https://forum.7g-sogo.com/viewtopic.php?f=15&t=59
[系統] reg 檔的操作
Reg 檔的結構大致如下
不需要特殊文字編輯器,可直接開啟新檔案將副檔名存成 .reg ,記得在檔案開頭加上
Windows Registry Editor Version 5.00 的字串後就是正式的 reg 檔了。
操作方式:
- 【加註解】 ";" :分號後的文字都屬於註解
- 【新增】
- 機碼 []:在 [] 中輸入要新增的機碼,如
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\HardwareID] - 值 "":每種類別的新增方式不同,如下:
- 字串 "":直接在 "" 中輸入所要的值,如:"Name"="administrator"
- DWORD:使用 dword: 後接值,如:"NoWinKeys"=dword:00000001 或
"NoWinKeys"=dword:1
- 【刪除】
- 機碼 []:"-":減號後接要刪除的機碼,如
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing] - 值 "" :在值後面輸入 =- 就可以直接刪除掉值了,如
"X 509 Certificate"=-
- 機碼:直接
- 值:
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\HardwareID]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\Store]
2019年5月24日 星期五
【文書】為什麼我兩個 Excel 檔的內容無法直接插入複製的儲存格
前幾天,公司的同仁突然問一個問題,說兩個 Excel 檔在各自選取複製的儲存格後,為什麼無法直接把內容以插入複製的儲存格方式互相作業呢?
這幾天在研究後發現,原來是不同模式惹的禍,也就是要互相操作的檔案要嘛都是 xls,不然就是 xlsx,不能一個 xls 而另一個是 xlsx,最保險方式就是使用相同副檔名的檔案,不是就擇一存檔→關閉→重開檔案。直接另存新檔後相容模式仍然是維持著,會造成同樣的錯誤。
這幾天在研究後發現,原來是不同模式惹的禍,也就是要互相操作的檔案要嘛都是 xls,不然就是 xlsx,不能一個 xls 而另一個是 xlsx,最保險方式就是使用相同副檔名的檔案,不是就擇一存檔→關閉→重開檔案。直接另存新檔後相容模式仍然是維持著,會造成同樣的錯誤。
2019年5月21日 星期二
【系統】Windows 7 開機時會卡在網際網路存取那邊
對我的電腦→管理→服務與應用程式→服務
找到
IP HELPer、NetworkConnections、RemoteAccess Connection Manager三個全改為"自動"
【系統】關閉 Windows 10 自動更新
由於公司電腦陸陸續續汰換了許多,而變成了 Windows 10,但討厭的問題來了,Windows 10時常會自動更新,並更新完後自爆 (當機、黑畫面的滑鼠轉圈圈),要如何關閉 Windows 的
方法一:閉閉更新服務
我的電腦→管理→服務→Windows Update (一般 & 相依性)
在"內容"中會看到"啟動類型"的下拉式選單
直接選"已停用"
方法二:把DNS改成「220.133.83.46」、「114.35.32.109」、「122.117.37.174」
https://workhard.tw/win10-%E5%A6%82%E4%BD%95%E6%B0%B8%E4%B9%85%E9%97%9C%E9%96%89-windows-update-%E8%87%AA%E5%8B%95%E6%9B%B4%E6%96%B0/
- 設定 hosts 檔的內容:https://www.reddit.com/r/Windows10/comments/5lousr/how_to_disable_windows_10_updates_sync_requests/
block microsoft links entries here. (要封鎖的 domain 設定如下)
127.0.0.1 *.download.windowsupdate.com
127.0.0.1 *.microsoft.com
127.0.0.1 *.update.microsoft.com
127.0.0.1 *.windowsupdate.com
127.0.0.1 *.windowsupdate.microsoft.com
127.0.0.1 download.microsoft.com
127.0.0.1 download.windowsupdate.com
127.0.0.1 ntservicepack.microsoft.com
127.0.0.1 test.stats.update.microsoft.com
127.0.0.1 windowsupdate.microsoft.com
127.0.0.1 wustat.windows.com
方法三:用 "gpedit.msc" 修改系統管理範本
首先在桌面同時按下 windows鍵+R鍵 叫出 執行 視窗
並輸入 “gpedit.msc” 按 確定

確定後會出現 本機群組原則編輯器 首先點擊左邊的 電腦設定
再透過右邊視窗點擊 系統管理範本 → Windows 元件 → Windows Update → 設定自動更新

點擊兩下後將選項從 尚未設定 更改到 已停用 並按下套用再確定

回到 Windows Update設定中我們也可以看到選項已經變成永遠不檢查更新且已經灰掉無法變更

方法四:以 Regedit 方式關閉
用記事本編輯一個禁用自動更新.REG內容如下Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoUpdate"=dword:00000001
"AUOptions"=dword:00000001
然後執行 禁用自動更新.REG
https://drive.google.com/open?id=1ZGBbyYb1xa3u1qHTvcLut_i1kGustzFX
分割線==============================分割線
NoAutoUpdate
0: 開啟自動更新
1 : 禁用自動更新
AUOptions
1: 自動更新中的“保持我的電腦最新”已被禁用。
2: 提醒下載和安裝。
3: 自動下載並提醒安裝。
4: 自動下載並自動執行計劃的安裝。
方法五:閉關更新權限
找到更新小幫手程式按右鍵→內容→安全性→拿掉 讀的權限
訂閱:
文章 (Atom)