Windows command 常用指令紀錄

自己常用的指令,做一下筆記,避免忘記

Windows 10 查詢金鑰

#wmic path softwarelicensingservice get OA3xOriginalProductKey

關閉windows防火牆

#NetSh Advfirewall set allprofiles state off

網卡設定

#ncpa.cpl

電腦管理

#compmgmt.msc

系統內容

#sysdm.cpl

磁碟清理工具

#cleanmgr

憑證

#certmgr.msc

控制台

#control

新增移除程式

#appwiz.cpl

查詢網域上使用者密碼到期日

#net user fred.wei /domain

記憶或清除網芳密碼

#control userpasswords2

清除所有網芳密碼

#net use * /del

針對IP中斷網芳密碼

#net use  \\192.168.1.100 /delete

掛取磁碟機(有密碼)

#net use  X:\\192.168.1.100\test /user:administrator password

掛取磁碟機(無密碼)

#net use  X:\\192.168.1.100\test /user:administrator ""

查詢喚醒電腦的程序

#powercfg -lastwake

查詢哪些可喚醒電腦的硬體

#powercfg -devicequery wake_armed

查帳號

#net user

查群組帳號 (網域控制站)

#net group

查時間

#net time \\192.168.1.100

重開遠端電腦

#net use \\192.168.1.100 /user:user user
#shutdown -r -t 0 -m \\192.168.1.100

安裝Service Pack後產生的備份檔案,移除暫存指令

#dism /online /cleanup-image /spsuperseded /hidesp

增加路由 (以系統管理員身分執行cmd)
暫時增加

#route add 1.2.3.4 mask 255.255.255.255 10.192.1.1 metric 20

永久保留

#route add -p 1.2.3.4 mask 255.255.255.255 10.192.1.1 metric 20

刪除路由

#route delete 1.2.3.4 mask 255.255.255.255

DC強制複寫指令

#Repadmin /syncall

重新建立用戶端與 DC 之間的安全通道

#nltest /SC_RESET:<DomainName>\<PDCServerName>

查詢FSMO role

#netdom query fsmo

架構主機 SchemaMaster
網域命名主機 DomainNamingMaster
PDC PDCEmulator
RID 集區管理員 RIDMaster
基礎結構主機 InfrastructureMaster

透過Powershell 直接強制移轉FSMO Role

#Move-ADDirectoryServerOperationMasterRole -Identity "DC2" -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator -Force

強制移除故障DC

Type ntdsutil and press Enter.
Type metadata cleanup and press Enter.
Type connections and press Enter.
Type connect to server <hostname> and press Enter. Where <-servername>, is the name of a working DC in the same domain.
Type quit and press Enter.
Type select operation target and press Enter.
Type list domains and press Enter.
Type select domain <number> and press Enter. Where <-number>, the corresponding number to the domain that the non-functional DC member was a member of.
Type list sites and press Enter.
Type select site <number> and press Enter. Where <-number>, the number that corresponds to the site that the non-functional DC member was a member of.
Type list servers in site and press Enter.
Type select server <number> and press Enter. Where <-number>, the number that corresponds to the DC you want to remove.
Type quit and press Enter.
Type remove selected server and press Enter
最後刪除前再次確認是否要真的刪除

使用dig工具查詢
下載路徑
http://www.isc.org/downloads/

Tools only install

設定系統環境變數

增加resolv.conf
在以下路徑增加resolv.conf

C:\Program Files\ISC BIND 9\etc

resolv.conf與Linux 相同設定 確認dig 指令


使用curl工具,下載路徑
https://winampplugins.co.uk/curl
可直接解壓縮到c:\windows\system32下做使用
確認curl 指令

遠端桌面Credssp問題 (For Server 2012 R2)
https://www.catalog.update.microsoft.com/Search.aspx?q=KB4103715

遠端桌面Credssp問題 (For Server 2016)

https://www.catalog.update.microsoft.com/Search.aspx?q=KB4093120

Facebook Comments
machine rape hentai hentaihug.com read hentai magna
ladki chodna pornude.mobi bluefilm com video
hindi video new pornozavr.me gora aur kala
نيك عنيف مترجم 24h-porn.net ينيكها وهي نايمه
يشبفسثء freebigassporn.org فيلم اجنبى قليل الادب
elizabeth olsen bf blondeporntrends.com malayalam sexi
chudai karwai indiandesiclips.com bhabisex.com
haryana village sex video ganstagirls.net wwwxnxcom
bf sexy vidio indiantubetv.com bhaagamathie songs naa songs
open sex free brownporntube.info open dance
bp hd sexy palimas.mobi xexi movie
malayalifuck dunato.mobi sex vedios malayalam
sexy film video hindi mai collegeporntrends.com tamilplay.com 2015 movies download
hot romantic sex porn alohaporn.net xnxx japnese
دانا فسبولى arabicaporn.com مصريه متناكه