Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Windows Registry
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== PowerShell commands and scripts === [[File:PowerShell registry provider.png|thumb|Using PowerShell to navigate the registry]] [[Windows PowerShell]] comes with a registry provider which presents the registry as a location type similar to the file system. The same commands used to manipulate files and directories in the file system can be used to manipulate keys and values of the registry.<ref name=Payette-Siddaway-2018>{{cite book|url=https://books.google.com/books?id=jDszEAAAQBAJ|title=Windows PowerShell in Action|last1=Payette|first1=Bruce|last2=Siddaway|first2=Richard|publisher=[[Manning Publications]]|date=2018|access-date=August 28, 2021|pages=7β8, 24, 608, 708β710|edition=Third|isbn=9781633430297}}</ref> Also like the file system, PowerShell uses the concept of a ''current location'' which defines the context on which commands by default operate. The <code>Get-ChildItem</code> (also available through the aliases <code>ls</code>, <code>dir</code> or <code>gci</code>) retrieves the child keys of the current location. By using the <code>Set-Location</code> (or the alias <code>cd</code>) command the user can change the current location to another key of the registry.<ref name=Payette-Siddaway-2018/> Commands which rename items, remove items, create new items or set content of items or properties can be used to rename keys, remove keys or entire sub-trees or change values. Through PowerShell scripts files, an administrator can prepare scripts which, when executed, make changes to the registry. Such scripts can be distributed to administrators who can execute them on individual machines. The PowerShell Registry provider supports transactions, i.e. multiple changes to the registry can be bundled into a single atomic transaction. An atomic transaction ensures that either all of the changes are committed to the database, or if the script fails, none of the changes are committed to the database.<ref name=Payette-Siddaway-2018/><ref>{{cite book|url=https://books.google.com/books?id=apztCAAAQBAJ|title=Windows PowerShell in 24 Hours, Sams Teach Yourself|last=Warner|first=Timothy L.|publisher=[[Sams Publishing]]|date=May 2015|access-date=August 28, 2021|page=[https://books.google.com/books?id=apztCAAAQBAJ&pg=PT49 19], [https://books.google.com/books?id=apztCAAAQBAJ&pg=PT241 211]|isbn=9780134049359}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)