一品网
  • 首页

reset password for local admin on Windows2016 by Powershell


上脚本吧,找半天

$password = "yourpassword"
$pwd = $password | ConvertTo-SecureString -asPlainText -Force
Get-LocalUser -Name "Administrator" | Set-LocalUser -Password $pwd

powershell的不同版本导致有些命令在不同的OS下不能使用

参考:https://www.thomasmaurer.ch/2018/07/manage-local-windows-user-powershell/

powershell

相关


linux版powershell中,tab补全,linux外部命令参数名,的模块介绍

Windows Terminal (Preview)治好了cmd,powershell的癌症

走进winrm ---powershell远程连接的4个安全级别,详解

linux版powershell安装教程(.net core版)

powershell读写磁盘变量(对象序列化)

powershell玩转SQL SERVER所有版本

Powershell编程基础-003-脚本的绝对路径及所在的目录

powershell中使用Get-FileHash计算文件的hash值

Windows Powershell – “Running scripts is disabled on this system”

powershell 自定义快捷键F7搜索弹窗展示历史记录

powershell 自定义tab键下拉菜单智能提示

如何去除PowerShell 更新提示

标签

一品网 冀ICP备14022925号-6