PowerShell: Difference between revisions

From Dave-Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


<code>$PSVersionTable.PSVersion</code>
<code>$PSVersionTable.PSVersion</code>
=Users=
==List users==
<code>net user</code>
==Change password of a local user account==
<code>net user [username] [new_password]</code>
==Enable or Disable a local user==
<code>net user [username] /active:yes</code> (or no)

Revision as of 14:59, 19 November 2023

General

Updating

  1. winget search Microsoft.PowerShell
  2. winget install --id Microsoft.PowerShell --source winget

Check Version

$PSVersionTable.PSVersion

Users

List users

net user

Change password of a local user account

net user [username] [new_password]

Enable or Disable a local user

net user [username] /active:yes (or no)