Selecting Multiple Properties
If you're interested in only a certain number of properties, you can use Select to specify that. All you have to do is separate the properties by a comma. Suppose you run the preceding script and find a number of undocumented shares on one of the servers—you might want a little bit more information, such as the path to the share and how many people are allowed to connect to it. By default, when a share is created, the "maximum allowed" bit is set, which basically says anyone who has rights to the share can connect. This can be a problem because if too many people connect to a share, they can degrade the performance of the server. To preclude such an eventuality, I always specify a maximum number of connections to ...
Get Microsoft® Windows PowerShell™ Step By Step now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.