Press of Global
No Result
View All Result
Tuesday, June 6, 2023
  • Login
  • Register
  • Home
  • Money Making
  • How To
  • Computer
  • Smartphone
  • World
  • Shop
Subscribe
Press of Global
  • Home
  • Money Making
  • How To
  • Computer
  • Smartphone
  • World
  • Shop
No Result
View All Result
Press of Global
No Result
View All Result
Home Technology Computer

Hyper-V Server Set Account Lockout Policy With Powershell

by admin
March 22, 2023
in Computer, Software, Technology
0 0
0
Hyper-V Server Set Account Lockout Policy With  Powershell
0
SHARES
73
VIEWS
Share on FacebookShare on Twitter

How to Change Password Policies In Hyper-V where gpedit.msc does not work? 

There is easy way of doing this. Just check tutorial below..

 The discovery of this info, from ‘net accounts,’ ultimately worked for me, and I was able to write a script that quickly displayed the Lockout policy info. Here is the output from ‘net accounts’:..

PS C:\Users\Freemium> net accounts

Force user logoff how long after time expires?:       0

Minimum password age (days):                          1

Maximum password age (days):                          60

Minimum password length:                              14

ADVERTISEMENT

Length of password history maintained:                24

Lockout threshold:                                    3

Lockout duration (minutes):                           15

Lockout observation window (minutes):                 15

Computer role:                                        WORKSTATION

The command completed successfully.

This code snippet was created to get the info into a variable:

$lockoutObj = net accounts | Select-string threshold

$lockoutStr = $lockoutObj.ToString()

$lockoutStr -match ‘\d{1,3}’ | out-null

$LO_threshold = $matches[0]

PS C:\Users\Freemium> echo $LO_threshold

ADVERTISEMENT

3

If you need to set the lockout threshold use this command (elevated priv. needed):

PS C:\Users\Freemium> net accounts /lockoutthreshold:10

The command completed successfully

PS C:\Users\Freemium> net accounts

Force user logoff how long after time expires?:       0

Minimum password age (days):                          1

Maximum password age (days):                          60

Minimum password length:                              14

Length of password history maintained:                24

Lockout threshold:                                    10

Lockout duration (minutes):                           15

Lockout observation window (minutes):                 15

Computer role:                                        WORKSTATION

The command completed successfully.

There are the options: 

NET ACCOUNTS

[/FORCELOGOFF:{minutes | NO}] [/MINPWLEN:length]

              [/MAXPWAGE:{days | UNLIMITED}] [/MINPWAGE:days]

              [/UNIQUEPW:number] [/DOMAIN]

You just change lockouttreshold to /maxpwage:20 and thats it. 
Post Views: 153
Tags: cmdcomputerhyper-vpowershelltricks

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

ADVERTISEMENT
  • Trending
  • Comments
  • Latest
Hyper-V Server Set Account Lockout Policy With  Powershell

Hyper-V Server Set Account Lockout Policy With Powershell

March 22, 2023
WD Black SN850X 2TB SSD discounted by 48% on Amazon 

WD Black SN850X 2TB SSD discounted by 48% on Amazon 

May 12, 2023

Brexit Has Created A Political Climate No Budget Can Fix

February 19, 2023
Grab this $200 Lenovo Laptop With a 15-inch Screen Before It’s Gone

Grab this $200 Lenovo Laptop With a 15-inch Screen Before It’s Gone

May 10, 2023
Best Kodi Live TV Addons April 2023 (IPTV)

Best Kodi Live TV Addons April 2023 (IPTV)

6
Keyboard Shortcuts, Tips And Tricks That Will Boost Your Productivity

Keyboard Shortcuts, Tips And Tricks That Will Boost Your Productivity

3
10 Little-Known Keyboard Shortcuts That Will Help You Save Time Every Day

10 Little-Known Keyboard Shortcuts That Will Help You Save Time Every Day

3
Regulators No Longer Target XRP; Instead They Focus On Ethereum (ETH)

Regulators No Longer Target XRP; Instead They Focus On Ethereum (ETH)

1
Where to Find Excavation Camps

Where to Find Excavation Camps in Fortnite

June 1, 2023
Share Wordle Results

How to Share Wordle Results

June 1, 2023
Change your Mouse Color

How to Change your Mouse Color in Windows 10 and 11?

June 1, 2023
Create and Run PowerShell

How to Create and Run PowerShell Scripts on Windows 10

June 1, 2023

Recent News

Where to Find Excavation Camps

Where to Find Excavation Camps in Fortnite

June 1, 2023
Share Wordle Results

How to Share Wordle Results

June 1, 2023

Categories

  • Branding
  • Business
  • Computer
  • Cryptocurrency
  • Deals
  • Discover
  • Economy
  • Entertainment
  • Featured
  • Funny Time
  • Gadget
  • Gaming
  • Health
  • How To
  • Innovation
  • Insider
  • Investment
  • Marketing
  • Markets
  • Money Making
  • Opinion
  • Politics
  • Quiz Time
  • Real Estate
  • Science
  • Smartphone
  • Software
  • Startup
  • Technology
  • The Escapist
  • Vacation
  • World

Site Navigation

  • Home
  • Advertisement
  • Contact Us
  • Privacy & Policy
  • Other Links
Press of Global

We bring you the best news, magazines, personal blog, tips and tricks, how to's, ideas, etc.

© 2023 PoGing.Net - All Rights Reserved.

No Result
View All Result
  • Business
  • Computer
  • How To
  • Opinion
  • World
  • Shop

© 2023 PoGing.Net - All Rights Reserved.

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.
Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?
Where to preorder the new mac pro, mac studio, and 15 inch macbook air. Refund and returns policy. Foldable holder adjustable riser bracket.