2019


Hướng dẫn sử dụng ForFiles để xóa các tệp cũ hơn N ngày trên Windows 10

Cách 1: Sử dụng ForFiles để xóa các tệp cũ hơn N ngày trên Windows 10:

  • Mở CMD với quyền admin
  • Gõ lệnh: ForFiles / p "C: \ path1\path2\pathN" / s / d -10 / c "cmd / c del @file"

  • / p - cho biết tên đường dẫn để bắt đầu tìm kiếm.
  • / s - hướng dẫn ForFiles tìm kiếm bên trong các thư mục con.
  • / d - chỉ định ngày sửa đổi cuối cùng cho một tệp.
  • / c - hướng dẫn ForFiles thực thi lệnh, cần được gói trong dấu ngoặc kép, mặc định là mật mã cmd / c del @file .

Cách 2: Sử dụng Task Scheduler để tự động xóa các tệp cũ hơn N ngày trên Windows 10
  1. pen Start.
  2. Search for Task Scheduler and click the top result to open the experience.
  3. Right-click the Task Scheduler Library folder.
  4. Click the New Folder option.
  5. Type any name for the folder and click OK. (We’re creating a new folder to keep tasks organized and separated from the system tasks.)
  6. Right-click the recently created folder, and select the Create Task option.
  7. In the “Name” box, enter a name for the task.
  8. In the “General” tab, under the “Security options” section, select the Run whether user is logged on or not option. (This is the option that will make the command window not to appear when the task runs automatically.)
  9. Thẻ lập lịch tác vụ
  10. Task Scheduler General tab
  11. Clear the Do not store password option.
  12. Click the “Triggers” tab, and click the New button.
  13. Using the “Begin the task” drop-down menu, select the On a schedule option.
  14. Under “Settings,” specify when you want the task to run (e.g., On time, Daily, Weekly, Monthly). Whatever option you select, make sure to specify the Start settings on the right side.
  15. Click the OK button.
  16. Cài đặt trình lập lịch tác vụ
  17. Task Scheduler Trigger settings
  18. Click the “Actions” tab, and click the New Button.
  19. Using the “Actions” drop-down menu, select the Start a program option.
  20. In the “Program/script” box, type the following command:
  21. ForFiles
  22. In the “Add arguments” box, type the following command and click the OK button.
  23. /p "C:\path\to\folder" /s /d -30 /c "cmd /c del @file"
  24. In the above command remember to change "C:\path\to\folder" specifying the path to the folder that you want to delete files, and change /d -30 to select files with a last modified date.
  25. Lập lịch tác vụ Cài đặt hành động
  26. Task Scheduler Action settings
  27. Click the “Settings” tab, and make sure to check the following options:
  28. Allow task to be run on demand.
  29. Run task as soon as possible after a scheduled start missed.
  30. If the task fails, restart every.
  31. Click the OK button.
  32. Task Scheduler additional settings
  33. If prompted, enter your administrative username and password.
  34. Click the OK button.

Windows 10 default environment variables

windows 10 variables


VARIABLE WINDOWS 10
%ALLUSERSPROFILE% C:\ProgramData
%APPDATA% C:\Users\{username}\AppData\Roaming
%COMMONPROGRAMFILES% C:\Program Files\Common Files
%COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files
%CommonProgramW6432% C:\Program Files\Common Files
%COMSPEC% C:\Windows\System32\cmd.exe
%HOMEDRIVE% C:\
%HOMEPATH% C:\Users\{username}
%LOCALAPPDATA% C:\Users\{username}\AppData\Local
%LOGONSERVER% \\{domain_logon_server}
%PATH% C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%PathExt% .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc
%PROGRAMDATA% C:\ProgramData
%PROGRAMFILES% C:\Program Files
%ProgramW6432% C:\Program Files
%PROGRAMFILES(X86)% C:\Program Files (x86)
%PROMPT% $P$G
%SystemDrive% C:
%SystemRoot% C:\Windows
%TEMP% C:\Users\{username}\AppData\Local\Temp
%TMP% C:\Users\{username}\AppData\Local\Temp
%USERDOMAIN% Userdomain associated with current user.
%USERDOMAIN_ROAMINGPROFILE% Userdomain associated with roaming profile.
%USERNAME% {username}
%USERPROFILE% C:\Users\{username}
%WINDIR% C:\Windows
%PUBLIC% C:\Users\Public
%PSModulePath% %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\
%OneDrive% C:\Users\{username}\OneDrive
%DriverData% C:\Windows\System32\Drivers\DriverData
%CD% Outputs current directory path. (Command Prompt.)
%CMDCMDLINE% Outputs command line used to launch current Command Prompt session. (Command Prompt.)
%CMDEXTVERSION% Outputs the number of current command processor extensions. (Command Prompt.)
%COMPUTERNAME% Outputs the system name.
%DATE% Outputs current date. (Command Prompt.)
%TIME% Outputs time. (Command Prompt.)
%ERRORLEVEL% Outputs the number of defining exit status of previous command. (Command Prompt.)
%PROCESSOR_IDENTIFIER% Outputs processor identifier.
%PROCESSOR_LEVEL% Outputs processor level.
%PROCESSOR_REVISION% Outputs processor revision.
%NUMBER_OF_PROCESSORS% Outputs the number of physical and virtual cores.
%RANDOM% Outputs random number from 0 through 32767.
%OS% Windows_NT
Although you can use environment variables to quickly access certain locations within Windows 10, you’ll typically use these variable when building an script or an application.

Keep in mind that some of the variables mentioned are not location specific, including %COMPUTERNAME%, %PATHEXT%, %PROMPT%, %USERDOMAIN%, %USERNAME%.

Hướng dẫn Reset khi quên password Windows 10 v1903 

reset password windows 10

Tạo một ổ Bootable Media có chứa cài đặt Windows 10. Ngoài ra bạn phải sử dụng đĩa cài đặt Windows thích hợp 32-bit hoặc 64-bit, điều này phụ thuộc vào phiên bản Windows bạn đã cài đặt. Sau đó thực hiện các bước sau:

1. Khởi động từ ổ USB cài đặt Windows.

2. Chờ cho đến khi màn hình Windows Setup xuất hiện:

3. Nhấn tổ hợp phím Shift + F10 để mở cửa sổ Command Prompt.

4. Trên cửa sổ Command Prompt bạn nhập regedit vào đó rồi nhấn Enter để mở Registry Editor.


5. Trên cửa sổ Registry Editor bạn tìm key HKEY_LOCAL_MACHINE ở danh sách khung bên trái.

Sau khi đã chọn xong key, trên Menu lệnh bạn chọn File => Load Hive...

chọn File => Load Hive...

6. Tiếp theo trên hộp thoại Load Hive bạn chọn file:

DRIVE:\Windows\System32\config\SYSTEM

Lưu ý:

Thay thế DRIVE bằng tên ổ bạn cài đặt Windows, thường là ổ C.

7. Nhập bất kỳ một tên nào mà bạn muốn cho Hive mà bạn đang load. Chẳng hạn như 123.

8. Điều hướng theo key:

HKEY_LOCAL_MACHINE\123\Setup

Đường dẫn

Chỉnh sửa thông số cmdline và thiết lập là cmd.exe. 

Thay đổi giá trị thông số SetupType DWORD thành 2.

9. Tiếp theo trên cửa sổ Registry, chọn key 123 ở danh sách khung bên trái rồi chọn File => Unload hive.

Đóng Registry Editor và tất cả các cửa sổ đang mở lại

Lúc này máy tính Windows 10 của bạn sẽ được khởi động lại.

10. Rút ổ USB và khởi động máy tính trực tiếp từ ổ cứng. Lúc này màn hình sẽ giống như hình dưới đây:

 Rút ổ USB và khởi động máy tính trực tiếp từ ổ cứng

11. Nhập câu lệnh dưới đây vào cửa sổ Command Propmt:

net user

Trên màn hình sẽ hiển thị tất cả các tài khoản đang tồn tại trên máy tính của bạn.

12. Để thiết lập mật khẩu mới cho tài khoản Windows của bạn, nhập câu lệnh dưới đây vào cửa sổ Command Propmt:

net user "your username" "new password"

13. Nhập tiếp regedit để mở Registry Editor.

14. Trên cửa sổ Registry bạn điều hướng theo key:

HKEY_LOCAL_MACHINE\System\Setup

Chỉnh sửa thông số cmdline và thiết lập giá trị trống.

Thay đổi giá trị thông số SetupType DWORD là 0.


15. Đóng cửa sổ Registry Editor và cửa sổ Command Prompt lại để tiếp tục.

Đóng cửa sổ Registry Editor và cửa sổ Command Prompt lại


Lúc này Windows 10 sẽ khởi động lại. Sau khi quá trình khởi động kết thúc, bạn có thể sử dụng mật khẩu mà bạn vừa thiết lập để đăng nhập máy tính Windows 10.

CCNA

CẤU HÌNH CƠ BẢN

1. Router>: User exec mode

Các lệnh cơ bản:
o Show version
o Show privilege
o Show flash

2. Router#: Privileged exec mode

o Enable/disable
o Show running-config (Gõ show run ->Tab tự hiện hết câu lệnh): xem các lệnh cấu hình
o Nhấn phím bất kỳ kết thúc dòng More… của lệnh
o Show startup-config: lệnh xem startup config
o Write/copy run startup-config (Xài 1 trong 2 lệnh để chép file startup config vào router)
o Write erase/erase start
o Reload: chạy lại
o Phím tăt: Ctrl +a đầu dòng
o Ctrl + E : cuối dòng
o Ctrl + D: delete ký tự bên phải
o Ctrl Shift 6 : dừng dòng lệnh lỗi
o Ctrl Z: về mode 2

3. Router(Config)#: Global configuration Exec Mode

o Config terminal: vào mode
o Exit: thoát mode, hoặc Ctrl Z
o Hostname Router1 : lệnh đặt tên Router là Router1
o Banner motd # Gõ lời chào # <-|
o Banner motd # <-|
********************
****ABCDBJJBJH******
********************
<-| #
o Enable password 123456 : đặt password cho mode 2 không mã hóa
o Gõ No enable password: xóa pass
o Enable secret 123456 : đặt pass mã hóa
o No ip domain-lookup: xóa phân giải tên khi Router ko hiểu, khỏi nhấn phím tắt Ctrl Shift 6
o No logging console: xóa thông báo gởi đến console port

4. Sub-mode

4.1 Console:

o Line console 0 1 (Chỉnh cổng 0 và 1, nếu chỉ có 1 cổng chỉ gõ 0)
o Exit: thoát ra và vào chế độ config t Mode 3
o End: thoát ra và vào chế độ Priviledge Mode 2
o Password 123456 enter và login rồi enter là một bộ lệnh đặt pass và yêu cầu login từ mode 1 khi muốn vào cổng console của Router
o Exec-timeout 0 20: thoát sau o phút 20 giây
o Exec-timeout 0   0: không tự logout
o Logging synchronous: chống trôi dòng lệnh đang gõ khi bị hiện thông báo

4.2 AUX: Toàn bộ lệnh giống console

4.3 Interface:

o Fixed: Các cổng cố định có các Type: Ethernet, Fast Ethernet, Gigabit Ethernet,…
  • Type port

o Module: Các cổng option gắn thêm
  • Type slot/port
  • Type slot/subslot/port


o Show ip interface brief : lệnh xem ip của interface sử dụng ở Mode 2
o Interface fastethernet 0/0: vào chế độ set cổng fastethernet 0/0
o No shutdown: lệnh mở cổng cho nó Up lên
o Ip add 192.168.15.101 255.255.255.0 : gán ip cho card inter hiện hành
o Sử dụng cho vLan của Swich or Router: (Để có thể Ping được)
o Interface vlan1: vào config vlan1
o No shutdown
o Ip add 192.168.15.102 255.255.255.0 : đặt ip cho vLan

4.4 VTY : Đặt password login và cho phép user kết nối đến router qua telnet

Line vty 0 1 đến 15 (Cho phép 1 đến15 user kết nối cùng thời điểm)
Password 456
login
Lệnh cho Telnet vào cổng HWIC-8A

Conf t
Line 0/0/0 0/0/7 : Cấu hình line 0/0/0 đến 0/0/7 1 lúc 8 line của HWIC-8A
No pass : không đặt pass
No login: không cần login
Transport input telnet: chuyển telnet đến HWIC-8A
Show line : xem các line ở Mode 2
Port của các Router = 2000 + số line
0/0/0 line 2 => port = 2002
0/0/7 line 9 => port =2009

Ngắt kết nối Telnet : Sau mỗi phiên kết nối phải clear rồi mới telnet lại được
  • Telnet 192.168.15.253
  • Enable
  • Clear line tty 2->9 : clear các line từ 2 đến 9, mỗi line 1 dòng


numlock on


Method 1 – Registry Setting

  1. Hold the Windows Key then press “R” to bring up the Run dialog box.
  2. Type “regedit“, then press “Enter“.
  3. Navigate to the following location in the registry:
    • HKEY_USERS
    • .Default
    • Control Panel
    • Keyboard
  4. Change the value of InitialKeyboardIndicators
    • Set it to 0 to set NumLock OFF
    • Set it to 2 to set NumLock ON

PowerShell Script

Use the following PowerShell code:
Enable Num Lock:
  • Set-ItemProperty -Path 'Registry::HKU\.DEFAULT\Control Panel\Keyboard' -Name "InitialKeyboardIndicators" -Value "2"
Disable Num Lock:
  • Set-ItemProperty -Path 'Registry::HKU\.DEFAULT\Control Panel\Keyboard' -Name "InitialKeyboardIndicators" -Value "0"
You can launch this and other PowerShell scripts at startup. Visit this post on using PowerShell to create a job that runs at startup to learn how.

Method 2 – Function Keys

You may have inadvertently pressed a key combination on your keyboard to cause certain letters on your keyboard to be used as a numeric keypad. This is normally the case for laptop users.
In most cases, you will have a “Fn” and “NumLk” key that can be used to toggle this setting on or off. Hold the “Fn” key, then press “NumLk” to toggle the numeric keypad on or off.

Method 3 – BIOS Setting

Most computers, including virtual machines will have a BIOS setting that controls whether or not NumLock is enabled or disabled at startup. You can usually enter the BIOS by pressing a certain key such as “Delete” or “F1” at startup before Windows loads. Once in the BIOS, you should be able to find a setting that controls NumLock.

Method 4 – Startup or Logon Script

If you’re an administrator looking for a way to set the Num Lock on at startup, you can do so using a logon script. There is no specific Group Policy setting to accomplish this. Instead use the following.
  1. Copy and paste the following into a Notepad document, then save it as “numlock.vbs“:
    set WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys "{NUMLOCK}"
  2. Do one of the following:
    • Place the “numlock.vbs” file in the “Startup” folder of the target computer or user.
    • Run the script through Group Policy using these steps:
      1. Place the “numlock.vbs” in one of the following folders:
        1. Local logon script path = “%SystemRoot% \ System32 \ GroupPolicy \ UserComputer\ Scripts \ Logon
        2. Domain logon script path = “%SysVolFolder% \ Sysvol \ Sysvol \ DomainName \ Scripts
      2. Hold down the Windows Key and press “R” to bring up the Windows Run dialog box.
      3. Type “mmc“, then press “Enter“.
      4. Go to “File” > “Add/Remove Snap-in” > “Add” > “Group Policy“.
      5. Select the GPO you wish to use by selecting “Browse“. The default is the local computer.
      6. Select “Finish” > “Close” > “OK“.
      7. From the Group Policy Management snap-in, navigate to “User Configuration” or “Computer Configuration” > “Windows Settings” > “Scripts“.
      8. Double-click “Logon script“, then go to “Add” > “Browse“, then select “numlock.vbs“.
      9. Select “Open” > “OK” > “OK“.
Note: The “numlock.vbs” script will simply act like it is pressing the “Num Lock” key once. So really, it will toggle it to the opposite of what it is by default. It’s probably better to use the Registry method, but this method is handy when you’re in a bind.

active server 2019


  • Phần 1: Convert Evaluation Edition to Volume License

- Mở CMD (Powershell) với quyền Admin

Standard Edition:
DISM /online /Set-edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
 
DataCenter Edition:
DISM /online /Set-edition:ServerDatacenter /ProductKey:WMDGN-G9PQG-XVVXX-R3X43-63DFG /AcceptEula

  • Phần 2: Kích hoạt KMS
B1: Mở CMD (Powershell) với quyền Admin

B2: Gõ 1 trong 3 lệnh sau tùy phiên bản

DataCenter: slmgr /ipk WMDGN-G9PQG-XVVXX-R3X43-63DFG

Standard: slmgr /ipk N69G4-B89J2-4G8F4-WWYCC-J464C

Essentials: slmgr /ipk WVDHN-86M7X-466P6-VHXV7-YY726

B3: Gõ lệnh slmgr.vbs /skms kms.digiboy.ir

B4: Gõ lệnh slmgr.vbs /ato

Sau 6 tháng khi Windows báo hết hạn, gõ lại lệnh slmgr.vbs /ato để có 6 tháng tiếp theo.

Key kích hoạt các phiên bản: (Update 15/04/2021)

Windows Server 2019 Essentials: JCKRF-N37P4-C2D82-9YXRT-4M63B
Windows Server 2019 Standard: WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY
Windows Server 2019 Datacenter: CB7KF-BWN84-R7R2Y-793K2-8XDDG
Windows Server 2019 Storage: QN4C6-GBJD2-FB422-GHWJK-GJG2R

08/05/2023

For Windows Server 2022

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Convert Windows Server Evaluation to retail edition

To get the available editions:


DISM /Online /Get-TargetEditions

To set your Windows Server to a higher edition:


DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula

Step 3 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:


Windows Server 2022 Datacenter: WX4NM-KYWYW-QJJR4-XV3QB-6VM33

Windows Server 2022 Standard: VDYBN-27WPP-V4HQT-9VMD4-VMK7H

Windows Server 2019 Datacenter: WMDGN-G9PQG-XVVXX-R3X43-63DFG

Windows Server 2019 Standard: N69G4-B89J2-4G8F4-WWYCC-J464C

Windows Server 2019 Essentials: WVDHN-86M7X-466P6-VHXV7-YY726

Windows Server 2016 Datacenter: CB7KF-BWN84-R7R2Y-793K2-8XDDG

Windows Server 2016 Standard: WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY

Windows Server 2016 Essentials: JCKRF-N37P4-C2D82-9YXRT-4M63B

Step 4 - Set KMS machine address

slmgr /skms kms_server

Replace kms_server with the real KMS server address (by online search). For now, the working KMS server is kms9.msguide.com.


Step 5 - Activate your Windows

slmgr /ato

Phương pháp này thông qua mã CMD để kết nối máy tính Windows 7 với máy chủ KMS nên tuyệt đối an toàn và hợp pháp.



Cách kích hoạt bản quyền Windows 7 này là hợp pháp và được Microsoft chấp nhận.
Đảm bảo an toàn về bảo mật, bạn có thể sử dụng bất kỳ phần mềm Antivirus nào để kiểm tra.
Không cần tắt Antivirus hay Windows Defender  khi active.
Không cần tắt tự động cập nhật sau khi Active.
Không sợ Microsoft phát hiện Windows lậu.
Đây là những dòng mã CMD nên dung lượng cực kỳ nhẹ (Chỉ khoảng 2 KB)).
Các phiên bản Windows 7 có thể kích hoạt theo cách này
Tất cả các phiên bản Windows 7 đều có thể kích hoạt bằng mã CMD này.

Windows 7 Professional.
Windows 7 Enterprise.
Windows 7 Ultimate.
Windows 7 Home Premium.
Windows 7 Home Basic.
Windows 7 Starter.

Cách kích hoạt bản quyền Windows 7 (Active Windows 7)

Bước 1: Tải về tệp ActiveWin7.cmd theo liên kết .

Bước 2: Chạy tệp tin vừa tải về với quyền quản trị viên (Run as administrator).

Hoặc mở CMD với quyền Administrator, paste lệnh sau:

@echo off
title Kich hoat Microsoft Windows 7 Professional/Enterprise mien phi!&cls&echo ============================================================================&echo #Kich hoat Microsoft Windows 7 hop phap - Khong su dung phan mem&echo ============================================================================&echo.&echo #San pham ho tro:&echo - Windows 7 Professional&echo - Windows 7 Ultimate&echo - Windows 7 Enterprise&echo - Windows 7 Home Premium&echo - Windows 7 Home Basic&echo - Windows 7 Starter&echo.&echo.&echo ============================================================================&echo Activating your Windows...&cd /d %windir%\system32&cscript //nologo slmgr.vbs /upk >nul&cscript //nologo slmgr.vbs /cpky >nul&wmic os | findstr /I "enterprise" >nul
if %errorlevel% EQU 0 (cscript //nologo slmgr.vbs /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH >nul&cscript //nologo slmgr.vbs /ipk YDRBP-3D83W-TY26F-D46B2-XCKRJ >nul&cscript //nologo slmgr.vbs /ipk C29WB-22CC8-VJ326-GHFJW-H9DH4 >nul) else (cscript //nologo slmgr.vbs /ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4 >nul&cscript //nologo slmgr.vbs /ipk MRPKT-YTG23-K7D7T-X2JMM-QY7MG >nul&cscript //nologo slmgr.vbs /ipk W82YF-2Q76Y-63HXB-FGJG9-GF7QX >nul)
set i=1
:server
if %i%==1 set KMS_Sev=kms7.MSGuides.com
if %i%==2 set KMS_Sev=kms8.MSGuides.com
if %i%==3 set KMS_Sev=kms9.MSGuides.com
if %i%==4 goto unsupported
cscript //nologo slmgr.vbs /skms %KMS_Sev% >nul&echo ============================================================================&echo.&echo.
cscript //nologo slmgr.vbs /ato | find /i "successfully" && (echo.&echo ============================================================================&choice /n /c YN /m "hethongmang.vn.vn [Y,N]?" & if errorlevel 2 exit) || (echo Ket noi voi may chu KMS khong thanh cong! Dang ket noi lai... & echo Vui long cho... & echo. & echo. & set /a i+=1 & goto server)
explorer "http://hethongmang.vn"&goto halt
:unsupported
echo ============================================================================&echo.&echo Phien ban Office cua ban khong duoc ho tro.&echo Download phien ban moi nhat tai day: http://hethongmang.vn/&echo.
:halt
pause

2 cách Reset mật khẩu Windows Server hiệu quả, đơn giản !


Mật khẩu quản trị (Administrator Password) là mật khẩu chỉ được lưu trong hệ điều hành server của bạn. Vào một ngày đẹp trời, vì một lý do nào đó bạn quên, hay mất tài khoản quản trị hoặc cũng có thể bị Hacker tấn công chiếm quyền quản trị Windows Server.

Khi gặp phải những trường hợp này, bạn cũng đừng quá lo lắng, bởi vì trong nội dung bài viết sau đây mình sẽ tập trung hướng dẫn những kỹ thuật cơ bản giúp bạn khôi phục mật khẩu tài khoản quản trị Windows Server một cách dễ dàng.

Yêu cầu hệ thống: Máy chạy hệ điều hành:

Windows Server 2012
Hoặc Windows Server 2016.
I. Reset mật khẩu Windows Server sử dụng đĩa cài đặt (Setup Disk).
Để thực hiện được kỹ thuật này, bạn cần tạo một đĩa CD/DVD hoặc USB có khả năng boot hệ điều hành Windows Server.

Note: Cái này thì đơn giản rồi, tương tự như cách tạo usb cài Windows bình thường thôi. Bạn có thể sử dụng phần mềm Rufus, hoặc bất kỳ cách nào trong tất cả các cách tạo usb cài Win.

+ Bước 1: Đầu tiên, bạn gắn đĩa CD/DVD hoặc USB mà bạn đã chuẩn bị ở bước trên vào máy Server, và tiến hành khởi động lại Server.

+ Bước 2: Sau khi Server khởi động lại, bạn chọn chế độ boot từ  đĩa CD/DVD hoặc USB (nhấn một trong các phím như Del, F12, F2, Esc,.. để truy cập vào BOOT MENU).



// Bạn có thể xem bài hướng dẫn cách vào BOOT MENU trên máy tính, áp dụng tương tự cho máy Server nha các bạn.

+ Bước 3: Trong giao diện đầu tiên của trình cài đặt Windows Server, bạn chọn ngôn ngữ => và nhấn Next để tiếp tục.



+ Bước 4: Chọn Repair your computer khi được hỏi để tiếp tục.



+ Bước 5: Kế tiếp, chọn Troubleshoot => Advanced Options => Command Prompt để mở cửa sổ dòng lệnh.





Cửa sổ CMD hiện ra như hình bên dưới.



+ Bước 6:  Tại cửa sổ Command Prompt,  bạn gõ lần lượt những lệnh sau => và nhấn Enter sau mỗi dòng lệnh:

d: cd windows\system32
ren Utilman.exe Utilman.exe.old
copy cmd.exe Utilman.exe



+ Bước 7: Tắt cửa sổ Command Prompt và nhấn Continue.

Sau khi Windows Server khởi động lại thành công, bạn nhấn tổ hợp phím Windows + U, tại màn hình đăng nhập để mở cửa sổ Command Prompt. Sau đó sử dụng lệnh sau:

net user administrator newpassword

Lưu ý: Bạn thay thế chuỗi newpassword của lệnh trên bằng chính mật khẩu mới của tài khoản Administrator.



Bây giờ, bạn có thể đăng nhập vào Windows Server bằng tài khoản quản trị với mật khẩu mới thay đổi.

II. Reset mật khẩu Windows Server sử dụng công cụ WinGeeker
#1. Điều kiện sử dụng công cụ WinGeeker
Một máy tính có CPU: 1 GHz (32 bit hoặc 64 bit)
File cài đặt WinGeeker Ultimate
Ổ đĩa CD/DVD hoặc USB trống
#2. Các bước thực hiện Reset mật khẩu Win Server bằng WinGeeker
1/ Tải và cài đặt WinGeeker trên một máy tính Windows khác.

Đầu tiên, bạn tải về file ISO image phần mềm WinGeeker tại đây hoặc tại đây => và cài đặt nó trên một máy tính chạy hệ điều hành Windows khác.

// Mục đích của bước này là chúng ta sẽ truy cập vào hệ điều hành Windows để tạo một chiếc usb có khả năng Reset lại mật khẩu cho máy chạy Windows Server. Đơn giản là như vậy thôi !



2/ Gắn đĩa CD/DVD hoặc USB để tạo một Reset Disk
Sau khi kết nối một đĩa CD/DVD hoặc USB vào máy tính đang làm việc, bạn khởi động phần mềm WinGeeker lên.

Sau đó nhấn chọn Burn CD/DVD hoặc Burn USB để tiến hành tạo một Reset Disk có khả năng boot công cụ WinGeeker khi khởi động Server.


3/ Boot từ đĩa CD/DVD hoặc USB trên máy chủ Windows Server
Gắn đĩa CD/DVD hoặc USB đã chuẩn bị ở bước trên vào máy Server => và tiến hành khởi động lại Server.

Sau khi Server khởi động lại, bạn chọn chế độ Boot ưu tiên từ  đĩa CD/DVD hoặc USB (hoặc bạn làm như hướng dẫn ở cách 1 đấy. Nhấn một trong các phím Del, F12, F2, Esc,.. khi Windows Server đang khởi động để truy cập vào BOOT MENU).



4/ Reset mật khẩu quản trị Window Server
Sau khi Server được khởi động từ đĩa CD/DVD hoặc USB, nó sẽ tự động mở chương trình WinGeeker và hiển thị danh sách những User hiện có trên Windows Server.

Bây giờ, bạn chọn vào user Administrator (hoặc user bất kỳ), nhấn chọn Reset Password. Cuối cùng nhấn chọn Reboot để khởi động lại server.



Sau khi Server khởi động hoàn tất, bạn có thể đăng nhập vào Windows Server với tài khoản quản trị (Administrator) mà không cần mật khẩu.

Lời kết

Qua bài viết này, mình đã cố gắng tập trung hướng dẫn những kỹ thuật dễ thực hiện và phổ biết nhất để bạn có thể tự khôi phục mật khẩu tài khoản quản trị Windows Server.

Tất nhiên, còn nhiều kỹ thuật khác để xử lý vấn đề này, các bạn có thể chủ động tìm hiểu thêm và chia sẻ lại nếu có phương pháp đơn giản và nhanh chóng hơn nhé.

Và đến đây thì bài viết Reset lại mật khẩu Windows Server của mình cũng đã hoàn tất. Hi vọng bài viết này sẽ hữu ích với bạn.


Các bạn mở CMD ( Command Prompt ) với admin, copy code sau phù hợp với phiên bản Office của bạn, chờ thực thi lệnh xong là đã thành công:


Lưu ý:
  1. - Code active phải cần kết nối Internet
  2. - Chỉ có hiệu lực với các bản Volume
  3. - Key sử dụng 6 tháng, muốn sử dụng thì nạp lại code.
#1. Cách mở CMD với Administrator 

Gõ "cmd" vào ô search > Chuột phải chọn Run as Administrator

#2. Nhập lệnh để Active (kích hoạt)
Xuất hiện 1 cửa sổ, các bạn copy code bên dưới vào để kích hoạt (Lưu ý là code phải phù hợp với phiên bản Office mà bạn đang sử dụng).

Office 2010:

if exist "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office14"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office14\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office14"
cscript //Nologo OSPP.VBS /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
cscript //Nologo ospp.vbs /sethst:kms.lotro.cc&cscript //nologo ospp.vbs /act&timeout 5&start winword&exit
@

Office 2013:

if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office15"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office15"
cscript OSPP.VBS /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT
cscript OSPP.VBS /inpkey:FN8TT-7WMH6-2D4X9-M337T-2342K
cscript OSPP.VBS /inpkey:KBKQT-2NMXY-JJWGP-M62JB-92CD4
cscript OSPP.VBS /inpkey:C2FG9-N6J68-H8BTJ-BW3QX-RM3B3
cscript ospp.vbs /sethst:kms.lotro.cc
cscript ospp.vbs /act

Hoặc

if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office15"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office15"
cscript //nologo OSPP.VBS /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT
cscript //nologo ospp.vbs /sethst:kms.lotro.cc&cscript //nologo ospp.vbs /act&timeout 5&start winword&exit
@

Office 2016:

set ver=16
if exist "%ProgramFiles%\Microsoft Office\Office%ver%\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office%ver%"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office%ver%\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office%ver%"
for /f "tokens=8" %b in ('cscript //nologo OSPP.VBS /dstatus ^| findstr /b /c:"Last 5"') do (cscript //nologo ospp.vbs /unpkey:%b)
for /f %i in ('dir /b ..\root\Licenses%ver%\ProPlusVL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses%ver%\%i"
cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
cscript ospp.vbs /sethst:kms.lotro.cc
cscript ospp.vbs /act
Start winword
@

Hoặc:

cscript slmgr.vbs /skms kms.digiboy.ir
cscript slmgr.vbs /ipk XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
cscript slmgr.vbs /ato d450596f-894d-49e0-966a-fd39ed4c4c64
timeout 2&start winword&exit

Office 2019:

1. ProPlus

if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16"
set "cmd=cscript //nologo ospp.vbs"
%cmd% /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP >nul 2>&1
%cmd% /dstatus | findstr "Office19ProPlus2019VL"
if not %errorlevel% == 0 (for /f %x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do %cmd% /inslic:"..\root\Licenses16\%x") 
%cmd% /unpkey:8MBCX >nul 2>&1
%cmd% /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
%cmd% /sethst:kms.lotro.cc & %cmd% /act
cls & %cmd% /dstatus
echo.
=================================
2. ProjectPro

if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16"
set "cmd=cscript //nologo ospp.vbs"
%cmd% /inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B >nul 2>&1
%cmd% /dstatus | findstr "Office19ProjectPro2019VL"
if not %errorlevel% == 0 (for /f %x in ('dir /b ..\root\Licenses16\ProjectPro2019VL*.xrm-ms') do %cmd% /inslic:"..\root\Licenses16\%x") 
%cmd% /inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B
%cmd% /sethst:kms.lotro.cc & %cmd% /act
cls & %cmd% /dstatus
echo.
=================================
3. VisioPro

if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16"
set "cmd=cscript //nologo ospp.vbs"
%cmd% /inpkey:9BGNQ-K37YR-RQHF2-38RQ3-7VCBB >nul 2>&1
%cmd% /dstatus | findstr "Office19VisioPro2019VL"
if not %errorlevel% == 0 (for /f %x in ('dir /b ..\root\Licenses16\VisioPro2019VL*.xrm-ms') do %cmd% /inslic:"..\root\Licenses16\%x") 
%cmd% /inpkey:9BGNQ-K37YR-RQHF2-38RQ3-7VCBB
%cmd% /sethst:kms.lotro.cc & %cmd% /act
cls & %cmd% /dstatus
echo.

Office 2021:
  ProPlus

@echo off
title Activate Microsoft Office 2021 (ALL versions) for FREE – MSGuides.com&cls&echo =====================================================================================&echo #Project: Activating Microsoft software products for FREE without additional software&echo =====================================================================================&echo.&echo #Supported products:&echo – Microsoft Office Standard 2021&echo – Microsoft Office Professional Plus 2021&echo.&echo.&(if exist “%ProgramFiles%\Microsoft Office\Office16\ospp.vbs” cd /d “%ProgramFiles%\Microsoft Office\Office16”)&(if exist “%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs” cd /d “%ProgramFiles(x86)%\Microsoft Office\Office16?)&(for /f %%x in (‘dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms’) do cscript ospp.vbs /inslic:”..\root\Licenses16\%%x” >nul)&echo.&echo =====================================================================================&echo Activating your product…&cscript //nologo slmgr.vbs /ckms >nul&cscript //nologo ospp.vbs /setprt:1688 >nul&cscript //nologo ospp.vbs /unpkey:6F7TH >nul&set i=1&cscript //nologo ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH >nul||goto notsupported
:skms
if %i% GTR 10 goto busy
if %i% EQU 1 set KMS=kms7.MSGuides.com
if %i% EQU 2 set KMS=s8.uk.to
if %i% EQU 3 set KMS=s9.us.to
if %i% GTR 3 goto ato
cscript //nologo ospp.vbs /sethst:%KMS% >nul
:ato
echo =====================================================================================&echo.&echo.&cscript //nologo ospp.vbs /act | find /i “successful” && (echo.&echo =====================================================================================&echo.&echo #My official blog: MSGuides.com&echo.&echo #How it works: bit.ly/kms-server&echo.&echo #Please feel free to contact me at msguides.com@gmail.com if you have any questions or concerns.&echo.&echo #Please consider supporting this project: donate.msguides.com&echo #Your support is helping me keep my servers running 24/7!&echo.&echo =====================================================================================&choice /n /c YN /m “Would you like to visit my blog [Y,N]?” & if errorlevel 2 exit) || (echo The connection to my KMS server failed! Trying to connect to another one… & echo Please wait… & echo. & echo. & set /a i+=1 & goto skms)
explorer “http://MSGuides.com”&goto halt
:notsupported
echo =====================================================================================&echo.&echo Sorry, your version is not supported.&echo.&goto halt
:busy
echo =====================================================================================&echo.&echo Sorry, the server is busy and can’t respond to your request. Please try again.&echo.
:halt
pause >nul

BẢO TRÌ MÁY TÍNH

CHUYÊN NGHIỆP VÀ UY TÍN {facebook#http://facebook.com/hethongmang.vn}

Biểu mẫu liên hệ

Tên

Email *

Thông báo *

Được tạo bởi Blogger.