12 Features of Windows PowerShell

Source: Internet
Author: User
Tags command line

Answer Powershell:powershell The original development code is Monad, originally intended to replace the command line tools in Windows, but later Microsoft said it was only a technical expansion. With PowerShell, the administrator can do anything that is done under the graphical interface. Windows PowerShell 1.0 can run on Windows XP SP2, Windows Server 2003, and Windows Vista.

1. Built-in cmdlets (ie "commandlets")

All cmdlets in Windows powershell allow such verb nouns: get-service, get-process, Stop-service, Get-wmiobject.

2. Powerful wildcard characters and manipulating objects

To get services that start with W and their dependent services, simply enter:

ps> get-service w* format-list DisplayName, dependentservices

3. Test the order before making a mistake

Windows PowerShell intentionally unique features: Whatif, you can tell you the results of the command execution without executing the command. such as:

ps> Stop-service w3*-whatif

4. Get a copy

PowerShell can start and end copies of all commands and can easily test the commands and save them at the same time in the script.

Ps> Start-transcript-path C:demodfoshow.txt

Ps> Stop-transcript

5. Publish Windows dialog from the command line

Because Windows PowerShell-bit objects are optimized to access COM objects from the command line like the. NET Framework, the following command tells your Vista machine to publish a "Windows Vista and PowerShell" string.

ps> $spVoice = new-object-com "Sapi.spvoice"

Ps> $spVoice. Speak ("Windows Vista and PowerShell")

6. Use Windows PowerShell to access applications such as Windows Media Player 11

Ps> $band = "The Posies"

ps> $player = new-object-com WMPlayer.OCX

Ps> $playlist = $player. Mediacollection.getbyauthor ($band)

Ps> $player. Openplayer ($playlist. Item (0). sourceURL)

7. Windows PowerShell Store calculator as a command line

PowerShell can do the basic computing work

Ps> 2*2

However, Windows PowerShell can also quickly resolve storage issues, such as how many 700MB of CDs are required to back up 11GB of data.

Ps> 11GB/700MB

So how many 1000GB of storage does it take to back up each 320GB, a total of 425 vista desktops?

PS > (320gb*425)/1000GB

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.