您好,欢迎访问三七文档
MICROSOFTSWITZERLAND20April2007FrankKoch(BERN)Developer&PlatformEvangelismWindowsPowerShellAnintroductiontoscriptingtechnologiesforpeoplewithnorealbackgroundknowledge1WindowsPowerShell|20.04.20072WindowsPowerShell|20.04.2007WindowsPowerShellWhatcanyouexpectfromsuchashortwork-AnattemptofanforewordObjectivesindraftingthisbookThis“WindowsPowerShell”bookwillgiveyouanintroductiontoWindowsPowerShellaswellaspracticalexamples,inordertogiveyouaquickintroductiontothissubjectevenifyouhavenosignificantpreviousscriptingexperience.Thebookisexplicitlynotaimedatprofessionalscripters;theextensiveWindowsPowerShellhelpandthemanyInternetforumsandadditionalliteraturearedesignedtogiveexpertseverythingtheyneed.However,thenewbiesamongstyouwillhopefullyfindeverythingyouneedinthisbooktoenableyoutothinkaboutscriptinginmoredetail,andhopefullyquicklylearntoenjoybeingabletooperateacomputerevenwithoutamouse.ThesourcesforthisbookweremainlyMicrosoftpublicationsrelatingtoWindowsPowerShell.Thisbookpresentstheinformationinanewwayappropriateforitstargetaudience,initiallyleavingoutthetheorywhilstusingmanyexamplesandminipracticalexercisessoastoholdyourinterest.OnceyouhaveworkedthroughthistextanddecidedtomakeWindowsPowerShellafixedpartofyoureverydayIT,feelfreetoreadtheoriginaldocumentationforWindowsPowerShell,whichisautomaticallyincludedwhenyouinstallWindowsPowerShell:FirstStepswithWindowsPowerShellBasicPrinciplesofWindowsPowerShellToreallyprofitfromthisbookyoushouldhaveaccesstoaPCwhereyoucansimultaneouslypracticetheexercises.TheonlyprerequisiteisaPCwithWindowsPowerShell1.0installed,whichisavailablefreeasofWindowsXPSP2.ForinformationondownloadingandinstallingPowerShellseethefollowingwebsites.OthersourcesofinformationonlineTheintroductorypageforWidowsPowerShellincludingdownloadlinkis://blogs.msdn.com/PowerShell/Hereyoucanreadinformationaboutscriptingtechniquesandpracticaldemos.Absolutelyeverything.InSwitzerlandyoucanalsofindinformationinGermanintheITProteamblogat|20.04.2007UsefulkeycombinationsforSwissstandardkeyboardsSYMBOLKEYCOMBINATIONMEANING|ATGGR7(NOT:ALTGR1=¦)FORWARDTHEOUTPUTFROMACOMMAND`SHIFT^,THENASPACECONTINUECOMMANDONNEXTLINE{ALTGRÄBEGINACOMMANDSEQUENCE(E.G.AFTERANIFSTATEMENT)}ALTGR$ENDACOMMANDSEQUENCE(E.G.FORANIFSTATEMENT[ALTGRÜSOMETIMESREQUIREDFOROBJECTS]ALTGR!SOMETIMESREQUIREDFOROBJECTSTABTABKEYCOMPLETESCOMMANDSWHERENECESSARYEXAMPLE:GET-HE(TAB)PRODUCESGET-HELPWindowsPowerShellwasdevelopedinRedmondandwasdesignedtoideallyfitAmericankeyboardlayouts.SomecommonlyusedkeysarethereforehardtofindonSwisskeyboards.Ihaveputtogetheralistforyouhere.4WindowsPowerShell|20.04.2007ContentsOBJECTIVESINDRAFTINGTHISBOOK....................................................................................................2OTHERSOURCESOFINFORMATIONONLINE...........................................................................................2USEFULKEYCOMBINATIONSFORSWISSSTANDARDKEYBOARDS................................................................3FIRSTIMPRESSIONSOFWINDOWSPOWERSHELL....................................................................................5ADDITIONALUSESFOROUTPUT:“PIPING”OBJECTS.................................................................................7INITIALEXERCISESWITHWINDOWSPOWERSHELLOBJECTS......................................................................8WORKINGWITHPROCESSES................................................................................................................8OUTPUTINATXT,CSVORXMLFILE...................................................................................................9OUTPUTINCOLOR.............................................................................................................................9CHECKINGCONDITIONSUSINGTHEIFCMDLET......................................................................................11OUTPUTINHTML..........................................................................................................................13WORKINGWITHFILES......................................................................................................................15FINDINGOBJECTINFORMATIONUSINGGET-MEMBER............................................................................16DELETINGFILES...............................................................................................................................17CREATINGFOLDERS.........................................................................................................................18IFYOUHAVETIME…........................................................................................................................21WINDOWSPOWERSHELLASGENERICOBJECTPROCESSIN
本文标题:Windows Powershell - free book from Microsoft
链接地址:https://www.777doc.com/doc-6445405 .html