13.07.2015 Views

Pro SharePoint 2013 Administration - EBook Free Download

Pro SharePoint 2013 Administration - EBook Free Download

Pro SharePoint 2013 Administration - EBook Free Download

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3 ■ Working with PowerShellAfter adding the snap-in, re-run the script to check for the registered snap-in, and you should see detailsof the snap-in.■ ■Note It is a good idea to use the <strong>SharePoint</strong> Management Shell for all <strong>SharePoint</strong> scripts, since all Cmdlets andfunctions run within the same thread. Scripts that run in the standard Windows PowerShell use separate threads forCmdlets and functions, which can cause memory leaks when using <strong>SharePoint</strong> objects.PowerShell SyntaxOnce you start using PowerShell frequently, you will understand the terminology and syntax for PowerShell Cmdletsand script notation. PowerShell Cmdlets assume the syntax verb-prefix noun. The verb always indicates the action onthe Cmdlet, and PowerShell supports the verb standards, listed in Table 3-1.Table 3-1. PowerShell VerbsVerbAddClearCloseCopyEnterExitFindFormatGetHideJoinLockMoveNewOpenPopPushRedoRemoveRenameResetActionAdds an object to a container or attaches an item to another itemRemoves all objects from a containerChanges the state of an object to closedCopies an object from one container to anotherSpecifies an action that allows the user to enter a resourceSpecifies an action that allows the user to exit out of a resourceLooks for an object in a containerFormats an object to a specific form or layoutRetrieves a specific object; paired with the Set verbMakes an object undetectable; paired with the Show verbCombines objects to one single objectSecures an object; paired with the Unlock verbMoves an object from one container to anotherCreates a new object instance; the Set verb may often be usedOpens an existing objectRemoves an object from the top of a stack containerPushes an object to the top of a stack containerResets an object to a state that was undone; pairs with the Undo verbRemoves an object from a containerRenames the name of an objectSets an object to its default state(continued)61www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!