2021母親節寵愛媽咪趁現在 贊助
2021-04-20 18:32:47 spawnshow

使用者密碼-顯示到期日

-------------------------------------------------------------------
使用者密碼-顯示到期日 .bat

@echo off
net user %username% /Domain | findstr "全名"
echo.
net user %username% /Domain | findstr "密碼到期"

pause
-------------------------------------------------------------------
使用者顯示到期日_選擇變更密碼 .bat

@echo off
net user %username% /Domain | findstr "全名"
echo.
net user %username% /Domain | findstr "密碼到期"
REM ### net user %username% /Domain | findstr "上次設定密碼 密碼到期"

@echo off
setlocal
:PROMPT
SET /P Sure= 是否變更密碼 (Y/[N])?
IF /I "%Sure%" NEQ "Y" GOTO END

set /P New_PW=請輸入密碼:
dsquery user -samid %username% | dsmod user -pwd %New_PW%

:END
Endlocal

-------------------------------------------------------------------
查詢遠端電腦作業系統版本 .bat

@echo off
echo ====================================
echo           Find Remote PC win_ver
echo ====================================
set /P HostName=Input 【HostName】:
set /P PW=Input 【PassWord】:

SYSTEMINFO /S %HostName% /U tsit_dm\skit220 /P %PW% /FO list | findstr "作業系統名稱 作業系統版本"

-------------------------------------------------------------------