Surround Spaces with Quotation Marks

When referencing objects or names that have spaces or special characters, make sure that the entire text string is enclosed in quotation marks or single quotation marks. When PowerShell detects a space, it assumes that the next character will be the beginning of a new parameter. When the text string is not within quotation marks, commands might fail. Both single and double quotation marks are acceptable. For example, when trying to retrieve the user Tom Pacyk, this command generates an error:

Get-CsUser Tom Pacyk

To successfully return the correct user, use the following command:

Get-CsUser "Tom Pacyk"

Get Microsoft® Lync® Server 2013 Unleashed Second Edition 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.