- Green versionCheck
- Green versionCheck
- Green versionCheck
- Green versionCheck
Introduction to Windows PowerShell functions
* 129 command-line tools (called "cmdlets") for performing common system administration tasks, such as managing services, processes, event logs, certificates, registries, and using Windows Management Instrumentation (WMI).
* Command-line tools with standard naming conventions and common parameters that are easy to learn and use; and simple tools for sorting, filtering, and formatting data and objects.
* Support for existing scripting languages, existing command line tools, and multiple Windows versions, including Windows XP, Windows Server 2003, Windows Vista and Windows Server (codenamed "Longhorn").
* Convenient features that enable users to browse data stores (such as registries and certificate stores) just as they would a file system.
* Standard utility for managing Windows data located in different stores and in different formats, including Active Directory (ADSI), Windows Management Instrumentation (WMI), Component Object Model (COM) objects, ActiveX data objects (ADO), HTML and XML.
* Advanced expression analysis and .NET object handling at the command line, including pipelining of objects to help improve IT professional productivity.
* Extensible interface that enables independent software vendors and enterprise developers to build custom cmdlets to meet unique application and system management requirements.
Windows PowerShell software features
1. Script editor
A powerful editor with syntax coloring, reference highlighting, bookmarks, code formatting and code completion. Create, edit and manage code snippets. Script with cmdlets from remote module.
2. Function generator
Easily create advanced features, including cmdlets and parameter properties, and annotation-based help. The function builder inserts the correct syntax for you.
3. GUI designer
The enhanced form designer makes GUI design fast and easy. No need to manually write hundreds of lines of code. Use pre-wired controls to create advanced GUIs.
4. Script debugger
Run and debug scripts and entire modules locally and remotely. Quickly debug, fix and verify any issues you may encounter. Support conditional breakpoints.
5. Multi-platform support
Supports both 32-bit and 64-bit versions of PowerShell in a single application. Run the script with elevated privileges and STA/MTA mode.
6. Create executable files and installers
Convert your script into an executable file. Create an MSI installer. Fine-tune custom access, elevation and platform. Runs 32-bit and 64-bit executables with Windows PowerShell installed.
7. Create module
Create a Windows PowerShell script module in minutes by choosing from existing features.
8. Performance Monitor
Visually track the performance of your scripts by displaying real-time memory and CPU usage. Shows performance results from the last three sessions side by side.
9. Editor console
Integrated Windows PowerShell console switches between 32-bit and 64-bit while maintaining your session.
10. Project
Use projects to manage multi-file scripts and create multi-form GUIs and script modules.
11. Source code management
Integrated source control connectivity backs up and versions your files so you never lose work.
12. Browser
Provides a browser for editor commands, functions, WMI objects, .NET objects, and databases.
13. New cmdlets
Windows PowerShell 6.1 introduces more than 100 built-in cmdlets. These cmdlets, to the exclusion of other tasks, allow you to perform computer-related, Event log and performance counter management tasks.
14. Script internationalization
This new feature enables Windows PowerShell scripts to display messages in the spoken language specified by the UI culture setting on the user's computer.
15. Advanced functions
Advanced functions have the same functionality and behavior as cmdlet functions. However, they are written entirely in the WindowsPowerShell language, not compiled C#.
16. Module
Modules allow script developers and administrators to partition and organize their Windows PowerShell into independent, reusable units code. The code in the module executes in its own independent context and does not affect the state outside the module.
Windows PowerShell installation steps
1. Download the latest version of Windows PowerShell installation package from Huajun Software Park. After unzipping, double-click the "exe" file to enter the installation wizard and click Next
2. Read the license agreement, click "I accept the...", and click Next
3. Click "Change" to select the installation location. Generally, the default is C drive. It is recommended to install on D drive. Click Next.
4. The software information is ready, click Install to install
5. The software is being installed, please wait patiently.
6. Windows PowerShell installation is complete, click Finish to exit the installation wizard
Windows PowerShell software commands
Basic commands
1. mkdir creates a directory, just an empty directory
2. pwd View the current directory (i.e. working directory) and display the absolute path
3. cd changes the directory, which is actually the operation of entering and exiting the directory.
4. ls lists the contents of the directory, lists all contents
5. rmdir deletes directories. Deleting directories that are not empty requires confirmation.
6. exit Exit the terminal, that is, close PowerShell
Commonly used commands
1. New-Item creates an empty file and can also be used to create a directory
2. cp copy text
3. mv move files
4. more View the file page by page. If there is a lot of content, only one screen will be displayed (press q to exit viewing)
5. cat stream file content display, all at once
6. rm deletes files and can also be used to delete folders
How to use Windows PowerShell
About how to use execution permissions
To prevent the execution of malicious scripts, PowerShell has an execution policy. By default, this execution policy is set to Restricted, which means that PowerShell scripts cannot be executed. You can use the following cmdlet command to determine the current execution policy: Get-ExecutionPolicy The execution strategies you can choose to use are:
Restricted - The script cannot be run;
RemoteSigned - locally created scripts can run, but scripts downloaded from the Internet cannot (unless they have a digital signature signed by a trusted publisher);
AllSigned – The script can only be run if it is signed by a trusted publisher;
Unrestricted – Script execution is unrestricted, regardless of where they come from and whether they are signed or not.
You can use the following cmdlet command to set the PowerShell execution policy: Set-ExecutionPolicy
How to create an event log
Administrators can use PowerShell to create a new event log and view the status of the event log. They can also use PowerShell to easily add a new event log. For example, you can use the following code to create a new application named TestSource. Event log.
New-EventLog -LogName Application -Source TestSource
If you want to write information to the Windows event log, you only need to call the WriteEntry method of EventLog. The specific code is as follows:
Write-EventLog -LogName Application -EventId 1234 -Source TestSource -Message "Test write"
Additionally, you can quickly view the configuration status and number of events of critical Windows event logs by using Windows PowerShell.
Get-EventLog The -List parameter is provided in the cmdlet, which can display the maximum value and OverflowAction of each event log file, as well as the current number of logs.
Windows PowerShell update log
1. The details are more outstanding!
2.BUG gone without a trace
Huajun editor recommends:
Windows PowerShell software is a software with excellent performance, which is obvious to all. Huajun Software Park also hasBatch Butler,Cloud Machine Manager,Hard drive serial number reader,Quickly hide taskbar icon tool,Android Emulator MasterWaiting for related software that is definitely worth downloading and using, come and choose your favorite one!
it works
it works
it works