I have made a powershell script to create a new client with multiple users in our environment. That is working just fine, but the only thing is that i need to delete te spaces in a variable.
The name of the company (Micro Soft) is used for the OU, Group and directory name. The only thing is that i need that companyname (Micro Soft) to be without spaces (MicroSoft). How can i manage to do this? I work with Powershell ISE on a Windows Server 2008R2 environment.
In forward many thanks.
by mjolinor at 2013-03-04 03:26:12
The simplest way to remove the spaces from a string is with the .replace() method: