local admin script

Anonymous
2022-06-24T11:02:10.91+00:00

Hi,

I am wondering what below script will do. When I searched the keywords on google it give not give me the right answer.

$SecurePasswordKey = '76492d1116743f0423413b16050a5345MgB8AE='
$key = (3,4,2,3,56,34,254,222,1,1,2,23,42,3)
$SecurePassword = ConvertTo-SecureString -String $SecurePasswordKey -Key $key
New-LocalUser "admin" -Password $SecurePassword

I want to use this script to configure LAPS.

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
800 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,877 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,276 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
858 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Pavel yannara Mirochnitchenko 11,411 Reputation points
    2022-06-24T11:49:44.317+00:00

    It generates new admin account with some kind of complex password. If you are with AD and LAPS, you don't need this at all.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Sherry Kissinger 3,791 Reputation points
    2022-06-24T11:38:37.75+00:00

    This may be the wrong forum for this question. Try asking in a power shell section?


  2. Anonymous
    2022-06-30T12:44:47.213+00:00

    Yes I have generate a simple password and let LAPS changed it.

    0 comments No comments