Enable Windows 10 Administrator Account

This post is not to emphasize or promote the use of the local administrator account or provide such level of access to your users. IT Professionals and security experts will tell you that providing local administrator account privileges for end users is risky as it can introduce lots of issues such as ransomware attacks, malware infections, risk of compromised systems, and Pass-the-Hash attacks to name a few.

The local administrator account on a Windows 10 system is disabled by default. If you need to enable it for troubleshooting purposes or for some management tasks, you can do so in 3 ways.

Option 1: Computer Management

  • Click Start > search for Computer Management
  • Expand Local Users and Groups
  • Expand Users
  • Right-click on Administrator account
  • Uncheck Account is disabled box > click Apply and OK
  • Right-click Administrator account
  • Click on Set Password
  • Click on Proceed
  • Enter new password as desired
  • Confirm password > click OK

Option 2: Command Prompt

  • Click on Start > search for Command Prompt
  • Right-click and Run as Administrator
  • Type the following command and press enter:

net user “Administrator” /active:yes

Option 3: PowerShell

  • Click on Start > search for PowerShell
  • Right-click and Run as Administrator
  • Type the following command and press enter:

Get-LocalUser -Name “Administrator” | Enable-LocalUser

To disable the local Administrator account:

Get-LocalUser -Name “Administrator” | Disable-LocalUser

PowerShell – Random Password Generator

ps-random-password

Generate random passwords using PowerShell.

Found this method from https://www.scriptjunkie.us/2013/09/secure-random-password-generation/ and modified by Sean Martin (myITforum.com PowerShell usergroup).

How To Obtain Computer Serial Number With PowerShell

To obtain the local computer serial number, use this one-liner PowerShell command:

get-wmiobject -Class win32_bios | select PSComputerName,SerialNumber

To obtain the serial number of a remote computer, use this one-liner PowerShell command (PSRemoting must be enabled:

get-wmiobject -ComputerName <name of computer> -Class win32_bios | select PSComputerName,SerialNumber

Configure PowerShell Remoting

To perform actions on remote computers using PowerShell, you’ll need to setup PowerShell Remoting. Here are the steps:

1. In a PowerShell CMD window that is running under the administrator context, run the following command:

Enable-PSRemoting –force

2. Configure WinRM to run automatically:

Set-Service WinRM -StartMode Automatic

3. Verify the start mode was set correctly and that it is currently running:

Get-WmiObject -Class win32_service | Where-Object {$_.name -like “WinRM”}

4. Configure so that all remote hosts are trusted:

Set-Item WSMan:localhost\client\trustedhosts -value *

5. Verify that the remote trusted hosts has taken effect:

Get-Item WSMan:\localhost\Client\TrustedHosts

Written by myITforum

PowerShell 5.0 RTM Now Available

powershellheader2

PowerShell 5.0 has finally RTM-ed, just in time for Christmas as announced on the PowerShell team blog. Windows Management Framework (WMF) 5.0 RTM replaces WMF 5.0 Production Preview and it’s supported on Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 SP1, Windows 8.1, and Windows 7 SP1.

WMF 5.0 adds new management functionality which includes Just Enough Admin (JEA), PowerShell Classes, PackageManagement, PowerShellGet, and improvement to existing technologies such as Desired State Configuration (DSC), PowerShell Script Debugging, Software Inventory Logging and etc.

Download WMF 5.0 from the Microsoft Download Center. WMF 5.0 requires .NET Framework 4.5 or higher which you can also obtain from the Download Center.

**IMPORTANT**
Systems that are running the following server applications should not run Windows Management Framework 5.0 at this time:

    • Microsoft Exchange Server 2013
    • Microsoft Exchange Server 2010 SP3
    • Microsoft SharePoint Server 2013
    • Microsoft SharePoint Server 2010
    • System Center 2012 Virtual Machine Manager

Servers running System Center Configuration Manager 2012 (ConfigMgr) can install and run WMF 5.0.

If you would like to provide any feedback to the PowerShell team, you can do so by using the UserVoice site.

keep-calm-and-learn-powershell-13

*************************************************************************************************

The following is a post by Neema Saeedi on MSDN which I’ve added for additional details:

Download the correct package for your operating system and architecture:

Operating System Architecture Package Name
Windows Server 2012 R2 x64 W2K12R2-KB3094174-x64.msu
Windows Server 2012 x64 W2K12-KB3094175-x64.msu
Windows Server 2008 R2 x64 W2K8R2-KB3094176-x64.msu
Windows 8.1 x64 W2K12R2-KB3094174-x64.msu
Windows 8.1 x86 Win8.1-KB3094174-x86.msu
Windows 7 SP1 x64 W2K8R2-KB3094176-x64.msu
Windows 7 SP1 x86 Win7-KB3094176-x86.msu

To install WMF 5.0 from Windows Explorer (or File Explorer in Windows Server 2012 R2 and Windows 8.1):

  1. Navigate to the folder into which you downloaded the MSU file.
  2. Double-click the MSU to run it.

To install WMF 5.0 from Command Prompt:

  1. After downloading the correct package for your computer’s architecture, open a Command Prompt window with elevated user rights (Run as Administrator). On the Server Core installation options of Windows Server 2012 R2 or Windows Server 2012 or Windows Server 2008 R2 SP1, Command Prompt opens with elevated user rights by default.
  2. Change directories to the folder into which you have downloaded or copied the WMF 5.0 installation package.
  3. Run one of the following commands:
    • On computers that are running Windows Server 2012 R2 or Windows 8.1 x64, run W2K12R2-KB3094174-x64.msu /quiet.
    • On computers that are running Windows Server 2012, run W2K12-KB3094175-x64.msu /quiet.
    • On computers that are running Windows Server 2008 R2 SP1 or Windows 7 SP1 x64, run W2K8R2-KB3094176-x64.msu /quiet.
    • On computers that are running Windows 8.1 x86, run Win8.1-KB3094174-x86.msu /quiet.
    • On computers that are running Windows 7 SP1 x86, run Win7-KB3094176-x86.msu /quiet.

Additional Installation Notes for Windows Server 2008 and Windows 7:

Ensure following prerequisites have been met:

  • Latest service pack is installed.
  • WMF 4.0 is installed

WinRM Dependency: Windows PowerShell Desired State Configuration (DSC) depends on WinRM. WinRM is not enabled by default on Windows Server 2008 R2 and Windows 7. To enable WinRM, in a Windows PowerShell elevated session, run Set-WSManQuickConfig.

*************************************************************************************************

Follow me on Twitter (@Hoorge) and join Tech Konnect on Facebook to stay current on technology related matters.

PowerShell & ConfigMgr Blogs

SCCM_Love_PS

My good friend Deepak Dhami (aka Dexter), who is an expert in PowerShell and System Center Configuration Manager (SCCM / ConfigMgr) is a frequent contributor for great information and resource in these fields. He conducts various user groups and workshops in India to help ConfigMgr admins improve their skills. Dexter has provided the links below on his blog and has generously allowed me to share them on mine in order to further share the goodness.

Feel free to follow and reach out to him. He is always happy to help.
PowerShell MVP profile
Blog
Twitter

Links:

Cmdlet ReferenceDavid O Brien’s Blog
PowerShell Script Repo by ConfigMgr MVP Kaido
Kaido’s personal blog
Coretech Blog by MVP kaido
Ronnie Jakobsen’s blog
Kent Agerlund’s blog
Johan Arwidmark’s blog
Henrik Hoe’s blog
PFE Heath’s Blog
Adam Meltzer’s Blog
Steve Rachui’s Blog
Nickolaj Andersen’s blog
Rob Looman’s Blog
Sean Lillis (Author of PS App deployment Toolkit)
Alex Verboon’s Blog
Laurie Rhodes’s Blog
Adam Bertram’s Blog
Stephane’s Blog