標籤

2020年6月25日 星期四

Windows 建立使用者

簡易的新增一使用者 並設定相關密碼
net user test 123 /add 新增使用者test 密碼 123
net user test * /add 新增使用者test 並於下次登入後輸入密碼

參考以下文章

Options for the Net User Command

  • /active:{yes | no}
    Activates or deactivates the account. If the account is not active, the user cannot gain access to the server. The default is yes.
  • /comment:"text"
    Provides a descriptive comment about the user's account (maximum of 48 characters). Be sure to put quotation marks around the text you use.
  • /countrycode:nnn
    Uses the operating system country code to implement the specified language files for a user's help and error messages. A value of 0 signifies the default country code.
  • /expires:{date | never}
    Causes the account to expire if date is set. The never option sets no time limit on the account. An expiration date is in the form mm/dd/yy or dd/mm/yy, depending on the country code. Months can be a number, spelled out, or abbreviated with three letters. Year can be two or four numbers. Use slashes (/) with no spaces to separate parts of the date.
  • /fullname:"name"
    Is a user's full name (rather than a user name). Enclose the name in quotation marks.
  • /homedir:pathname
    Sets the path for the user's home directory. The path must exist.
  • /passwordchg:{yes | no}
    Specifies whether users can change their own password. The default is yes.
  • /passwordreq:{yes | no}
    Specifies whether a user account must have a password. The default is yes.
  • /profilepath[:path]
    Sets a path for the user's logon profile.
  • /scriptpath:pathname
    Is the location of the user's logon script.
  • /times:{times | all}
    Is the logon hours. The times option is expressed as day[-day][,day[-day]],time[-time][,time [-time]], and is limited to 1-hour increments. Days can be spelled out or abbreviated. Hours can be 12-hour or 24-hour notation. For 12-hour notation, use am, pm, a.m., or p.m. The all option specifies that a user can always log on, and a blank value specifies that a user can never log on. Separate day and time entries with a comma, and separate multiple day and time entries with a semicolon.
  • /usercomment:"text"
    Lets an administrator add or change the user comment for the account.
  • /workstations:{computername[,...] | *}
    Lists as many as eight computers from which a user can log on to the network. If the /workstations option has no list or if the list is *, the user can log on from any computer.
  • net help user | more
    Displays Help one screen at a time.

NOTE: You can obtain all of the information contained in this article by typing the following command:  net help user


例子
建立使用者
echo ********************************
echo 配合/EXPIRES:NEVER成立
echo 需要修改本機安全性設定
echo ********************************
net accounts /maxpwage:unlimited

echo ********************************
echo 刪除使用者
echo ********************************
net user  UserName /delete

echo ********************************
echo 建立使用者
echo ********************************
net user UserName PassWord /PASSWORDCHG:NO /expires:Never /COMMENT:"描述" /add

echo ********************************
echo 新增使用者到Administrators群組
echo ********************************
net localgroup Administrators  UserName /add

echo ********************************
echo 配合/EXPIRES:NEVER成立
echo 需要修改本機安全性設定
echo ********************************
WMIC USERACCOUNT WHERE "Name='UserName '" SET PasswordExpires=FALSE



2020年6月19日 星期五

印表機設定完整移機封裝還原方法

文章來源:https://a7432186.pixnet.net/blog/post/252300361


備份

開始>控制台>系統管理工具>列印管理>匯出成檔案



接下來一直按下一步直到還原完成就可完成印表安裝、設定轉移


使用 DiskSpd 測試磁碟效能

  DiskSpd 是微軟創建的命令行磁碟測試工具。它結合了強大的IO工作負載定義來測量磁碟效能。由於它支援自由配置和調整參數,使其成為存儲效能測試、驗證和基準測試的理想工具。 步驟 1. 從 GitHub (說明) https://github.com/Microsoft/di...