PowerShell#
What is PowerShell?
PowerShell is a task-based command-line shell and scripting language built on .NET. PowerShell helps system administrators and power-users rapidly automate tasks that manage operating systems (Linux, macOS, and Windows) and processes.
PowerShell commands let you manage computers from the command line. PowerShell providers let you access data stores, such as the registry and certificate store, as easily as you access the file system. PowerShell includes a rich expression parser and a fully developed scripting language.
Resources#
Scripts & Snippets#
Disable Beep#
Code#
PowerShell | |
---|---|
What?#
This series of commands will:
- Set your execution policy so that you can have a
$profile
- Create a profile located at
C:\Users\<username>\Documents\WindowsPowerShell
calledMicrosoft.PowerShell_profile.ps1
- The file contents will be
Set-PSReadlineOption -BellStyle None
Note
If you already have a $profile
, you'll want to simply add
Set-PSReadlineOption -BellStyle None
to it.
Disable Startup Message#
Code#
Add Clear-Host
to your $profile
. For more information on $profile
,
see the above section about disabling beep.
What?#
This removes that obnoxious startup message text:
Text Only | |
---|---|
Windows 10 Pro → Enterprise#
Code#
Batchfile | |
---|---|
What?#
This command, which is technically a Windows Command and not PowerShell, will turn any Windows 10 Pro install into a Windows 10 Enterprise install. No reboot required!
Source: Windows 10 Edition Upgrade @ Microsoft Docs
Why?#
Sometimes you're working in an Enterprise environment and have a machine that just has to be reimaged with normal, Pro edition Windows on it. This command allows you to convert it to Enterprise afterwards, bind it to your domain, and make sure you're getting the proper licensing.