![]() ![]() Get-EXOMailbox -PropertySets Minimum,Retention | Sort-Object DisplayName | Ft DisplayName,Retention* Compatible Cmdlets ![]() These examples show how to use the pipeline in different ways to list Exchange Online mailboxes that are archive enabled: Although no limit exists for the number of cmdlets in a pipeline, be careful not to make it too complex as this could lead to unintended consequences. Using a pipeline between these cmdlets expands what we can do. Those with PowerShell for the first time often end up using single cmdlets to construct one-liners to query information like Get-EXOMailbox to list Exchange Online mailboxes or change settings with Set-EXOMailbox. Using objects means that PowerShell has maximum flexibility when the next cmdlet in the pipeline processes the data it receives. Keep in mind that when the information passes from left to right, PowerShell stores the data as objects for the next cmdlet to process and not as plain text. When creating a pipeline between cmdlets, information passes from the cmdlet on the left to the cmdlet on the right. The pipeline character ‘|’ separates the cmdlets. PowerShell uses a concept called pipelining to combine two or more cmdlets to perform a cohesive task. By themselves, single cmdlets are useful, but being able to feed information from one cmdlet to another is an incredibly useful feature of PowerShell. Working with PowerShell we have many cmdlets that can perform tasks such as queries, configuration changes and more. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |