WWW.ABSTRACT.XLIBX.INFO
FREE ELECTRONIC LIBRARY - Abstract, dissertation, book
 
<< HOME
CONTACTS



Pages:   || 2 | 3 | 4 | 5 |   ...   | 54 |

«Copyright © 2009 BBS Technologies ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored, ...»

-- [ Page 1 ] --

Copyright

© 2009 BBS Technologies

ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced,

transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical,

including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution,

information networks, or information storage and retrieval systems except as permitted under

Section 107 or 108 of the 1976 United States Copyright Act without the prior written permission of the publisher.

For permission to use material from the text please contact Idera at info@idera.com.

Microsoft® Windows PowerShell® and Microsoft® SQL Server® are registered trademarks of Microsoft Corporation in the United Stated and other countries. All other trademarks are the property of their respective owners.

About the Author Dr. Tobias Weltner is one of the most visible PowerShell MVPs in Europe. He has published more than 80 books on Windows and Scripting Techniques with Microsoft Press and other publishers, is a regular speaker at conferences and road shows and does high level PowerShell and Scripting trainings for companies throughout Europe. He created the powershell.com website and community in an effort to help people adopt and use PowerShell more efficiently. As software architect, he created a number of award-winning scripting tools such as SystemScripter (VBScript), the original PowerShell IDE and PowerShell Plus, a comprehensive integrated PowerShell development system.

Acknowledgments First and foremost, I’d like to thank my family who is always a source of inspiration and encouragement. A special thanks to Idera, Rick Pleczko, David Fargo, Richard Giles, Conley Smith and David Twamley for helping to bring this book to the English speaking world. It has been a pleasure working with you all. You are all great friends and partners. For Aleksandar Nikolic, our technical editor and very good friend, I thank you very much for all your hard work. You not only edited the book, but many times your insight and attention to detail improved the overall value as well. Finally, I'd like to thank my dog and close companion Cofi for his loyal faith and for pulling me away from work from time to time to enjoy life.

Sincerely, Dr. Tobias Weltner Windows PowerShell MVP Mastering PowerShell Chapters

1. The PowerShell Console 11. Finding and Avoiding Errors

2. Interactive PowerShell 12. Command Discovery and Scriptblocks

3. Variables 13. Text and Regular Expressions

4. Arrays and Hashtables 14. XML

5. The PowerShell Pipeline 15. The File System

6. Using Objects 16. The Registry

7. Conditions 17. Processes, Services, Event Logs

8. Loops 18. Windows Management Instrumentation

–  –  –

The PowerShell Console Welcome to PowerShell! This chapter will introduce you to the PowerShell console and show you how to configure it, including font colors and sizes, editing and display options.

Topics Covered:

–  –  –

Table of Contents | About PowerShell Plus 6 Sponsors | Resources | © BBS Technologies Starting PowerShell After you installed PowerShell, you'll find the PowerShell icon on the Start Menu in the program folder Windows PowerShell. Open this program folder and click on Windows PowerShell and the PowerShell console comes up. By the way, if you aren't able to find the program folder, PowerShell is probably not installed on your computer. It is an optional download from Microsoft for Windows XP, Server 2003, and Windows Vista.

You can also start PowerShell directly. Just press (Windows)+(R) to open the Run window and then enter powershell (Enter). If you use PowerShell often, you should open the program folder for

Windows PowerShell and right-click on Windows PowerShell. That will give you several options:

Add to the start menu: On the context menu, click on Pin to Start Menu so that PowerShell • will be displayed directly on your start menu from now on and you won't need to open its program folder first.

Quick Launch toolbar: Click Add to Quick Launch toolbar if you use Windows Vista and • would like to see PowerShell right on the Quick Launch toolbar inside your taskbar. Windows XP lacks this command so XP users will have to add PowerShell to the Quick Launch toolbar manually.

Keyboard shortcuts: Administrators particularly prefer using a keyboard instead of a • mouse. If you select Properties on the context menu, you can specify a key combination in the hot-key field. Just click on this field and press the key combination intended to start PowerShell, such as (Alt)+(P). In the properties window, you also have the option of setting the default window size to start PowerShell in a normal, minimized, or maximized window.

Autostart: If you use PowerShell daily, it makes sense to Autostart the application. Then, it • will automatically launch the PowerShell window when Windows starts up so all you have to do to bring it up is to click on its window button on the taskbar. If you want to set up a PowerShell autostart, open the Windows PowerShell 1.0 program folder and right-click on Windows PowerShell on the All Programs menu of your start menu. On the context menu, select Copy. Next, open Startup folder, right-click on a blank area, and select paste on the context menu. This will place a PowerShell shortcut in the folder. All you have to do now is click on the shortcut with the right button of your mouse and choose Properties. Specify the window size as Minimized.





–  –  –

(Run without administrative privileges whenever possible) First Steps with the Console After PowerShell starts, its console window opens, and you see a blinking text prompt, asking for your input with no icons or menus. PowerShell is a command console and almost entirely operated via keyboard input. The prompt begins with "PS" and after it is the path name of the directory where

you are located. Start by trying out a few commands. For example, type:

hello (Enter) As soon as you press (Enter), your entry will be sent to PowerShell. Because PowerShell has never heard of the command "hello" you will be confronted with an error message highlighted in red.

–  –  –

For example, if you'd like to see which files and folders are in your current directory, then type dir (Enter). You'll get a text listing of all the files in the directory. PowerShell's communication with you is always text-based. PowerShell can do much more than display simple directory lists. Just pick a

different command as the next one provides a list of all running processes:

Get-Process (Enter) PowerShell's advantage is its tremendous flexibility since it allows you to control and display nearly all the information and operations on your computer. The command cls deletes the contents of the console window and the exit command ends PowerShell.

Incomplete and Multi-line Entries Whenever you enter something PowerShell cannot understand, you get a red error message, explaining what went wrong. However, if you enter something that isn't wrong but incomplete (like a string with one missing closing quote), PowerShell gives you a chance to complete your input. You then see a double-prompt (""), and once you completed the line and pressed ENTER twice, PowerShell executes the command. You can also bail out at any time and cancel the current command or input by pressing: (Ctrl)+(C).

The "incomplete input" prompt will also appear when you enter an incomplete arithmetic problem

like this one:

–  –  –

Table of Contents | About PowerShell Plus 9 Sponsors | Resources | © BBS Technologies

This feature enables you to make multi-line PowerShell entries:

"This is my little multiline entry.(Enter) I'm now writing a text of several lines. (Enter) And I'll keep on writing until it's no longer fun."(Enter) (Enter) This is my little multiline entry.

I'm now writing a text of several lines.

And I'll keep on writing until it's no longer fun.

The continuation prompt generally takes its cue from initial and terminal characters like open and closed brackets or quotation marks at both ends of a string. As long as the symmetry of these characters is incorrect, you'll continue to see the prompt. However, you can activate it even in other

cases:

dir `(Enter)

-recurse(Enter) (Enter) So, if the last character of a line is what is called a "backtick" character, the line will be continued.

You can retrieve that special character by pressing (`).

Important Keyboard Shortcuts Shortcuts are important since almost everything in PowerShell is keyboard-based. For example, by pressing the keys (Arrow left) and (Arrow right), you can move the blinking cursor to the left or right. Use it to go back and correct a typo. If you want to move the cursor word by word, hold down (Ctrl) while pressing the arrow keys. To place the cursor at the beginning of a line, hit (Home).

Pressing (End) will send the cursor to the end of a line.

–  –  –

Deleting Incorrect Entries If you've mistyped something, press (Backspace) to delete the character to the left of the blinking cursor. (Del) erases the character to the right of the cursor. And you can use (Esc) to delete your entire current line.

The hotkey (Ctrl)+(Home) works more selectively: it deletes all the characters at the current position up to the beginning of the line. Characters to the right of the current position (if there are any) remain intact. (Ctrl)+(End) does it the other way around and deletes everything from the Table of Contents | About PowerShell Plus 10 Sponsors | Resources | © BBS Technologies current position up to the end of the line. Both combinations are useful only after you've pressed (Arrow left) to move the cursor to the middle of a line, specifically when text is both to the left and to the right of the cursor.

Overtype Mode If you enter new characters and they overwrite existing characters, then you know you are in typeover mode. By pressing (Insert) you can switch between insert and type-over modes. The default input mode depends on the console settings you select. You'll learn more about console settings soon.

Command History: Reusing Entered Commands For example, you don't have to re-type commands to edit them. Simply press (Arrow up) to redisplay the command that you entered. Press (Arrow up) and (Arrow down) to scroll up and down your command history. Using (F5) and (F8) do the same as the up and down arrow keys.

This command history feature is extremely useful. Later, you'll learn how to configure the number of commands the console "remembers." The default setting is the last 50 commands. You can display all the commands in your history by pressing (F7) and then scrolling up and down the list to select commands using (Arrow up) and (Arrow down) and (Enter).

–  –  –

(F8) provides more functionality than (Arrow up) as it doesn't just show the last command you entered, but keeps a record of the characters you've already typed in. If, for example, you'd like to

see all the commands you've entered that begin with "d", type:

d(F8) Press (F8) several times. Every time you press a key another command will be displayed from the command history provided that you've already typed in commands with an initial "d."

Table of Contents | About PowerShell Plus 11 Sponsors | Resources | © BBS Technologies Automatically Completing Input An especially important key is (Tab). It will save you a great deal of typing (and typing errors).

When you press this key, PowerShell will attempt to complete your input automatically. For example,

type:

cd(Tab)

The command cd changes the directory in which you are currently working. Put at least one space behind the command and then press (Tab). PowerShell suggests a subdirectory. Press (Tab) again to see other suggestions. If (Tab) doesn't come up with any suggestions, then there probably aren't any subdirectories available.

This feature is called AutoComplete, which works in many places. For example, you just learned how to use the command Get-Process, which lists all running processes. If you want to know what other

commands there are that begin with "Get-", then type:

Get-(Tab) Just make sure that there's no space before the cursor when you press (Tab). Keep hitting (Tab) to see all the commands that begin with "Get-".

–  –  –

AutoComplete works really well with long path names that require a lot of typing. For example:

c:\p(Tab) Every time you press (Tab), PowerShell will prompt you with a new directory or a new file that begins with "c:\p." So, the more characters you type, the fewer options there will be. In practice, you should type in at least four or five characters to reduce the number of suggestions.

When the list of suggestions is long, it can take a second or two until PowerShell has compiled all the possible suggestions and displays the first one.

–  –  –

PowerShell will automatically put the entire response inside double quotation marks if the response contains whitespace characters.

Table of Contents | About PowerShell Plus 12 Sponsors | Resources | © BBS Technologies Scrolling Console Contents The visible part of your console depends on the size of your console window, which you can change with your mouse. Drag the window border while holding down your left mouse button until the window is the size you want. Note that the actual contents of the console, the "screen buffer," don't change. So, if the window is too small to show everything, you should use the scroll bars.

Selecting and Inserting Text Use your mouse if you'd like to select text inside the PowerShell window and copy it onto the clipboard. Move the mouse pointer to the beginning of the selected text, hold down the left mouse button and drag it over the text area that you want to select.



Pages:   || 2 | 3 | 4 | 5 |   ...   | 54 |


Similar works:

«bombardier cs300 bombardier cs300 Bombardier CSeries 100 | Ab 2015 im Einsatz | SWISS Ab 2015 beginnt SWISS die Avro RJ100-Flotte mit der Bombardier CSeries 100 abzulösen. Finden Sie die technische Daten zur Bombardier Cseries 100.Bombardier CSeries Wikipedia Bombardier CSeries; CS100-prototyyppi ensilennollaan: Tyyppi: Kanada: Valmistaja: Bombardier: Ensilento: CS100: 16. syyskuuta 2013 CS300: 27 Bombardier Aerospace Wikipedia Bombardier Aerospace ist nach Boeing und Airbus der drittgrößte...»

«Simulation in Produktion und Logistik Entscheidungsunterstützung von der Planung bis zur Steuerung Wilhelm Dangelmaier, Christoph Laroque & Alexander Klaas (Hrsg.) Paderborn, HNI-Verlagsschriftenreihe 2013 Simulationsbasiertes Assistenzsystem zur Bewertung, Auswahl und Konfiguration von PPS-Methoden für mittelständische Produktionsdienstleister – Anforderungen, Systemkonzeption und Anwendungsperspektiven Simulation-based assistance system for evaluation, selection and configuration of...»

«0 SUMMIT FOR ADDRESSING DISPROPORTIONALITY PLANNING COMMITTEE The Summit for Addressing Disproportionality is one component of The Disproportionality Technical Assistance Network (DTAN). This event has been known as the Annual Disproportionality Conference (2005-2008), the CREATE a Culturally Responsive Environment Conference (2009), and the CREATE Conference (2010-2013). During 2013, the CREATE grant initiative underwent reconfiguration efforts reflecting the sustainability of the purpose,...»

«A Comparison of Laser and Microwave Approaches to CW Beamed Energy Launch Jordin T. Kare† and Kevin L. G. Parkin‡ † Kare Technical Consulting, 908 15th Ave. East Seattle WA 98112, USA ‡ Division of Engineering and Applied Science, California Institute of Technology, 1200 East California Boulevard, Pasadena, CA 91125, USA Abstract. One approach to beamed energy propulsion uses a solid heat exchanger to absorb energy from a distant source and transfer it to a working fluid. Systems of...»

«_ CURRICULUM VITA Personal data Name Mufeed Issa Batarseh Date of Birth 14.06.1968 Place of Birth Jarash/Jordan Marital Status Married, three daughters Occupation Director/Associate Professor Mutah University, Karak, Jordan Email: Batarseh@mutah.edu.jo EDUCATION Date Educational Institute Country Major Certificate Environmental Analytical Technical University of 2000-2003 Germany Chemistry and Waste Ph.D Braunschweig Analysis (Chromatography) Environmental Sciences and Management 1997-1999...»

«EWGAE 2010 Vienna, 8th to 10th September Reinforcement effect on the ultrasonic pulse velocity in concrete, depending on the sounding method and measuring device U. LENCIS 1, A. ŪDRIS 2, A. KORJAKINS 3 Riga Technical University, Institute of Materials and Structures, Azenes 16/20, LV-1658, Riga, Latvia; uldis.lencis@inbox.lv, tel. and fax +371 67089138, 2 aigars.udris@rtu.lv, tel. +37167089240, aleks@latnet.lv, tel. +37167089248 Keywords: Concrete, nondestructive testing, ultrasonic pulse...»

«Reinhard Grünwald CO2-Abscheidung und -Lagerung bei Kraftwerken Sachstandsbericht zum Monitoring »Nachhaltige Energieversorgung« November 2007 Arbeitsbericht Nr. 120 Umschlagbild: www.statoilhydro.com INHALT ZUSAMMENFASSUNG 3 I. EINLEITUNG 15 II. STAND DER TECHNIK 19 1. CO2-Abtrennung 20 2. Transport 26 3. CO2-Lagerung 29 3.1 Geologische Lagerung – Mechanismen und Optionen 29 3.2 Weitere Lagerungsoptionen 33 III. POTENZIALE, RISIKEN, KOSTEN 35 1. Potenziale für geologische CO2-Lagerung 35...»

«De Re Atari Converted by Andreas Bertelmann for ABBUC www.abbuc.de Preface Introduction by enter value here This manual is about the ATARI Home Computer. It covers both the ATARI 400TM and the ATARI 800TM Computers. These two computers are electrically identical, differing only in mechanical features such as the keyboards and cartridge slots. The purpose of this manual is to explain in detail how to use all the features of the ATARI Computer. Because this is a complex and powerful machine, the...»

«European Organisation for Technical Approvals Europäische Organisation für Technische Zulassungen Organisation Européenne pour l‘Agrément Technique ETAG 001 GUIDELINE FOR EUROPEAN TECHNICAL APPROVAL OF METAL ANCHORS FOR USE IN CONCRETE Part five: BONDED ANCHORS Edition March 2002 1 Amended November 2006 st 2nd Amended February 2008 3rd Amended April 2013 Copyright © 2012 EOTA EOTA Avenue des Arts 40 Kunstlaan B – 1040 Brussels INTRODUCTORY NOTES In this Part requirements, criteria and...»

«International Journal of Digital Evidence Summer 2004, Volume 3, Issue 1 An Extended Model of Cybercrime Investigations Séamus Ó Ciardhuáin Abstract A comprehensive model of cybercrime investigations is important for standardising terminology, defining requirements, and supporting the development of new techniques and tools for investigators. In this paper a model of investigations is presented which combines the existing models, generalises them, and extends them by explicitly addressing...»

«Э.Л. АКИМ, Т.М. ЭНЕЕВ О МСТИСЛАВЕ ВСЕВОЛОДОВИЧЕ КЕЛДЫШЕ Abstract: The life way of M.V. Keldysh is briefly outlined. M.V. Keldysh was the leader of theoretical investigations in the cosmonautics, the famous scientist and science manager. The personal memories of authors are included. Key words: jet and cosmic technique, the languages of programming, EOM architecture, nets, visualization systems. Анотація: Коротко описано...»

«Ecole polytechnique fédérale de Zurich Eidgenössische Politecnico federale di Zurigo Technische Hochschule Swiss Federal Institute of Technology Zurich Zürich Semesterarbeit Kurvenmodellierung magnetischer Eigenschaften von antiferromagnetischen Nanopartikeln Gabriela Stamm SS 05 Betreuung: Franziska Brem, Institut für Geophysik, Gruppe für Magnetik, ETH Zürich Inhaltsverzeichnis 1 Zusammenfassung.. 3 2 Einleitung.. 3 3 Theorie.. 4 4 Vorgehen.. 7 5 Resultate.. 8 6 Diskussion.. 14 7...»





 
<<  HOME   |    CONTACTS
2016 www.abstract.xlibx.info - Free e-library - Abstract, dissertation, book

Materials of this site are available for review, all rights belong to their respective owners.
If you do not agree with the fact that your material is placed on this site, please, email us, we will within 1-2 business days delete him.