首页 > 系统相关 >禁用 Windows Server 2022 密码过期策略的批处理命令 密码永不过期

禁用 Windows Server 2022 密码过期策略的批处理命令 密码永不过期

时间:2023-06-18 13:22:26浏览次数:29  
标签:批处理 过期 Server 密码 Windows 2022

禁用 Windows Server 2022 密码过期策略的批处理命令:

打开记事本,将以下命令复制粘贴到记事本中:
wmic path Win32_UserAccount where "LocalAccount=True AND PasswordExpires=True" set PasswordExpires=False
将文件保存为后缀名为 .bat 的批处理文件,比如 "disable_password_expiration.bat"。

双击运行该批处理文件并等待命令执行完成即可。

标签:批处理,过期,Server,密码,Windows,2022
From: https://www.cnblogs.com/suv789/p/17489011.html

相关文章

  • 使用以下命令来关闭 Windows Server 2022 上的 Internet Explorer 安全增强
    使用以下命令来关闭WindowsServer2022上的InternetExplorer安全增强:打开记事本,将以下命令复制粘贴到记事本中:@echooffregadd"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ActiveSetup\InstalledComponents{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"/vIsInstalled/tR......
  • 使用以下命令来禁止 Windows Server 2022 在登录时自动启动服务器管理器
    使用以下命令来禁止WindowsServer2022在登录时自动启动服务器管理器:打开记事本,将以下命令复制粘贴到记事本中:regadd"HKLM\Software\Microsoft\ServerManager"/vDoNotOpenServerManagerAtLogon/tREG_DWORD/d1/f将文件保存为后缀名为.bat的批处理文件,比如"disabl......
  • Windows提权到system权限
    提权到ntauthority\system权限:1.在PowerShell下运行p.ps1脚本2.运行如下命令:[MyProcess]::CreateProcessFromParent(1580,"c:\windows\system32\cmd.exe","")3.在新打开的窗口中运行whoami,可以看到当前账户为ntauthority\system4.然后可以重启schedule服务scstopschedule&......
  • 使用以下命令将 Windows Server 2022 上的 Bluetooth 服务全部设置为自动启动
    使用以下命令将WindowsServer2022上的Bluetooth服务全部设置为自动启动:打开记事本,将以下命令复制粘贴到记事本中:scconfigbthservstart=autoscconfigBluetoothAudioGatewayServicestart=autoscconfigBluetoothAVRCPServicestart=autoscconfigBluetoothUse......
  • 找出Windows指定文件夹中的大文件
    #-*-coding:utf-8-*-importos#字节b转化kb\m\gdefformat_size(b):try:b=float(b)kb=b/1024except:print("传入的字节格式不对")return"Error"ifkb>=1024:M=kb/1024......
  • Windows10远程访问Ubuntu服务器上的Jupyter Notebook解决办法
    1、nginx反向代理 2、概要:可能有的同学在使用Python的时候喜欢使用.py文件,而有的同学喜欢使用JupyterNotebook做开发,但是苦于不会使用远程服务器的JupyterNotebook而放弃,而这篇文章将教会你怎样远程访问JupyterNotebook。官方地址:官方地址远访配置:创建JupyterNot......
  • Windows All Killer
    代码大部分来自网络#include<iostream>#include<windows.h>#include<tlhelp32.h>#include<stdio.h>#include<aclapi.h>#include<bits/stdc++.h>usingnamespacestd;#defineNTMODEF1#defineZWMODEF0DWORDProtectProcess(void......
  • Windows 下编译 OpenCV 和 OpenCV-contrib
    文章目录导言环境准备源码获取环境获取配置CMake并编译ConfigureGenerate生成项目总结导言在本文中,我们将介绍如何在Windows系统下编译OpenCV和OpenCV-contrib。OpenCV是一个开源的计算机视觉库,它包含了许多图像处理和计算机视觉的功能。而OpenCV-contrib则是一个由社......
  • windows下mysql使用mysqldump定时备份数据库,删除过期备份
    windows下mysql使用mysqldump定时备份数据库,删除过期备份创建备份脚本:@echooffforfiles/p"d:\mysql_backup"/mbackup_*.sql-d-7/c"cmd/cdel/f@path"set"Ymd=%date:~0,4%%date:~5,2%%date:~8,2%"cdD:\Mysql\mysql-8.0.18\binmysqldump--opt......
  • mysql5.7密码策略说明
    一、mysql5.7在创建用户设置密码时提示“ERROR1819(HY000):Yourpassworddoesnotsatisfythecurrentpolicyrequirements”createuser'tom'@localhostidentifiedby'123456';ERROR1819(HY000):Yourpassworddoesnotsatisfythecurrentpolicyrequi......