Ignore spaces in names powershell

I have created a script which checks in all Laptop OUs in AD and checks if those laptops are member of a particular group.
If not it adds them to that group.
The problem is script does not work with OU's which have space in name  for example in xyz.com domain there is one OU ABC DEF in which Laptops OU is there , so the members of this OU does not get added to group.
How to ignore the space in name ?
My code is as folows :
#=========================================================================================
import-module activedirectory
$group=Get-ADGroup LaptosWIFI
$FileName = "AddedToday" + $((get-date).tostring("MMddyyyy"))
Get-ADOrganizationalUnit -Filter {Name -like '*laptop*'} |
ForEach-Object{
$comp = Get-ADComputer -Filter * -Searchbase "OU=Laptops,OU=XYZ ABC,DC=UAT,DC=ABCUAT,DC=COM"
$string = $comp.name
$names= @()
$names+= $string -split "\s+"
foreach ($element in $names) {
Write-Host $element
Get-ADComputer $element -Properties MemberOf | %{if (-Not ($_.MemberOf -like "*LaptopsWIFI*")) {$element | Out-File -append E:\WiFiLaptopsAdded\$($FileName).txt }}
Get-ADComputer $element -Properties MemberOf | %{if (-Not ($_.MemberOf -like "*LaptopsWIFI*")) {Add-ADGroupMember gIN-WIFI-Laptops -Members $_}} -ErrorAction SilentlyContinue
in this code OU "XYZ ABC" is considered as different and i get following error when i run the script
 Get-ADComputer <<<<  $element -Properties MemberOf | %{if (-Not ($_.Memb
erOf -like "*gIN-WIFI-Laptops*")) {Add-ADGroupMember gIN-WIFI-Laptops -Members
$_}} -ErrorAction SilentlyContinue
    + CategoryInfo          : WriteError: (:) [Get-ADComputer], ParameterBindi
   ngException
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.ActiveDirectory
   .Management.Commands.GetADComputer
Get-ADComputer : Cannot bind parameter 'Identity' to the target. Exception sett
ing "Identity": "Cannot validate argument on parameter: 'Identity'. The argumen
t is null or empty. Supply an argument that is not null or empty and then try t
he command again."
At C:\Scripts\LaptopAdditionWIFI\LaptopAddition.ps1:23 char:20
+      Get-ADComputer <<<<  $element -Properties MemberOf | %{if (-Not ($_.Memb
erOf -like "*gIN-WIFI-Laptops*")) {$element | Out-File -append D:\WiFiLaptopsAd
ded\$($FileName).txt }}
    + CategoryInfo          : WriteError: (:) [Get-ADComputer], ParameterBindi
   ngException
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.ActiveDirectory
   .Management.Commands.GetADComputer

I have created a script which checks in all Laptop OUs in AD and checks if those laptops are member of a particular group.
If not it adds them to that group.
The problem is script does not work with OU's which have space in name  for example in xyz.com domain there is one OU ABC DEF in which Laptops OU is there , so the members of this OU does not get added to group.
How to ignore the space in name ?
My code is as folows :
#=========================================================================================
import-module activedirectory
$group=Get-ADGroup LaptosWIFI
$FileName = "AddedToday" + $((get-date).tostring("MMddyyyy"))
Get-ADOrganizationalUnit -Filter {Name -like '*laptop*'} |
ForEach-Object{
$comp = Get-ADComputer -Filter * -Searchbase "OU=Laptops,OU=XYZ ABC,DC=UAT,DC=ABCUAT,DC=COM"
$string = $comp.name
$names= @()
$names+= $string -split "\s+"
foreach ($element in $names) {
Write-Host $element
Get-ADComputer $element -Properties MemberOf | %{if (-Not ($_.MemberOf -like "*LaptopsWIFI*")) {$element | Out-File -append E:\WiFiLaptopsAdded\$($FileName).txt }}
Get-ADComputer $element -Properties MemberOf | %{if (-Not ($_.MemberOf -like "*LaptopsWIFI*")) {Add-ADGroupMember gIN-WIFI-Laptops -Members $_}} -ErrorAction SilentlyContinue
in this code OU "XYZ ABC" is considered as different and i get following error when i run the script
 Get-ADComputer <<<<  $element -Properties MemberOf | %{if (-Not ($_.Memb
erOf -like "*gIN-WIFI-Laptops*")) {Add-ADGroupMember gIN-WIFI-Laptops -Members
$_}} -ErrorAction SilentlyContinue
    + CategoryInfo          : WriteError: (:) [Get-ADComputer], ParameterBindi
   ngException
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.ActiveDirectory
   .Management.Commands.GetADComputer
Get-ADComputer : Cannot bind parameter 'Identity' to the target. Exception sett
ing "Identity": "Cannot validate argument on parameter: 'Identity'. The argumen
t is null or empty. Supply an argument that is not null or empty and then try t
he command again."
At C:\Scripts\LaptopAdditionWIFI\LaptopAddition.ps1:23 char:20
+      Get-ADComputer <<<<  $element -Properties MemberOf | %{if (-Not ($_.Memb
erOf -like "*gIN-WIFI-Laptops*")) {$element | Out-File -append D:\WiFiLaptopsAd
ded\$($FileName).txt }}
    + CategoryInfo          : WriteError: (:) [Get-ADComputer], ParameterBindi
   ngException
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.ActiveDirectory
   .Management.Commands.GetADComputer
Your error messages are for your $element variable.  Unless you are using \s+ in your computer names the attribute doesn't need to be trimmed.
Might have to tweak it a bit but here's some syntax for your loop
foreach {$OU in Get-AdADOrganizationalUnit -Filter {Name -like "*laptop*"})
Get-ADComputer -LdapFilter "(!MemberOf=$group)" -SearchBase $OU.DistinguishedName -SearchScope 2 -Properties MemberOf|
Tee-Object output|%{Add-AdGroupMember $group -Members $_.DinstinguishedName}
$Output
$Output| Out-File -append E:\WiFiLaptopsAdded\$($FileName).txt
MCSE/MCSA/MCP/Security+,A+

Similar Messages

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • Trying to ignore spaces when comparing strings

    I am writing a program where an answer entered by a user is compared to an answer held in a database. I have got it working but I can't get it to ignore 'spaces' or 'carriage returns'. Please can you have a look at my code and let me know what I can do to get this working.
    Thanks in advance
    Jes
    public class DBHandler {
    public DBHandler(String aQuestNum, String studentAnswer) {
    JOptionPane jop = new JOptionPane();
    JOptionPane jop2 = new JOptionPane();
    try {
    DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
    Connection aConnection = DriverManager.getConnection("jdbc:odbc:EnquiryTest", "", "");
    Statement aStatement = aConnection.createStatement();
    ResultSet aSet = aStatement.executeQuery ("SELECT * FROM EnquiryTestTable2 WHERE questionNum = '" + aQuestNum +"'");
    while (aSet.next()) {
    String tutorAnswer = aSet.getString("TAnswer");
    int test = tutorAnswer.compareTo(studentAnswer);
    if(test == 0)
    jop2.showMessageDialog(null,"Right Answer Well Done!");
    else
    jop.showMessageDialog(null,"Wrong Answer Try Again!");
    aConnection.close();
    catch (SQLException e) { System.exit(9);}
    }

    My suggestion is to loop through the student answer ( make a copy of it if you need it for other purposes ) and remove all the spaces and carriage returns and then compare them. Here's an example:
    StringBuffer tempBuffer( studentAnswer );
    while( tempBuffer.indexOf( " " ) != -1 )
    tempBuffer.deleteCharAt( tempBuffer.indexOf( " " ) );
    You could use this to also check for newline characters \t and carriage returns ( not sure what ascii character is used for that ). Also the String method .trim() will remove all whitespace before and after the string ( but not say, spaces between words ).

  • Why can't get my photos in photo stream to transfer to I photo, shows up as black space with name only

    How do I select then send Photos from photo stream to I Photo to edit? My photo ends up not transferring or is shown as black space with name below, without photo in I Photo. Any one have an answer?

    Hi there Harvest 61,
    You may find the troubleshooting steps in the article below helpful.
    iCloud: My Photo Stream troubleshooting
    http://support.apple.com/kb/ts3989
    -Griff W. 

  • FileSaveService ignored the file name and file extensions

    I am using the JNLP API to build a JWS application. When using the FileSaveService, I found it automaticlly ignored the file name and file extensions I passed to the 'FileSaveService.saveFileDialog()'.
    My code is like the following:
    String[] xtns = {"csv"};
    FileContents fileContents = fileSaveService.saveFileDialog(
    ".", xtns, stream, "testFile"); Im running this application in JRE version 1.6.0_20-b02 in Windows XP.
    Although in the JNLP API, it said the file name and file extension 'might be ignored by the JNLP client', I still wonder if anyone has a better solution for this?
    Thanks very much :)

    Sean.Wang wrote:
    ..I still wonder if anyone has a better solution for this?Visit [http://pscode.org/jws/api.html#fs]. Click the link to the 'Launch File Service (sandboxed) demo'. Type some characters into the text area then activate the 'Save File' button. Do you get a file chooser that defaults to (.zzz) extension?
    Then if yes, and that is a 'better solution' for you, then yes, I have one. The code of the demo. can be downloaded at a link just to the right of the launch link.

  • Ignoring spaces and non-alphanumeric characters

    I need some help with this program im working on. It's testing to see whether words are palindromes or not. The trouble is, i need to make the program ignore spaces and puncuation. Does anyone know of a command to do this, or a command where i can list all the common types of puncuation and get the program to ignore them.
    Thanks

    you can use regular expressions (regex) for this. I'm not very experienced with regex (though I admit I should become familiar with it ;)), so for more information check out Sun's regex tutorial and regular-expressions.info.
    if you're not interested in regex (or if you don't have access to a 1.4+ SDK), you can just use ASCII filtering to achieve this (see this ASCII table for basic ASCII values). Basically, you're only going to accept A-Z and 0-9 characters (if I understand your question correctly). This means the only ASCII values you want to accept is 48-57, 65-90, and 97-122. You can use a simple boolean method to check if a character is valid. Something like this should work:
    public boolean valid(char c) {
         int x = (int)c; // ascii value of c
         return ((x >= 48 && x <= 57) || (x >= 65 && x <= 90) || (x >= 97 && x <= 122));
    }Use this method on every character of the String you want to process. So to validate an entire String you can use a method like this:
    public boolean valid(String s) {
         for (int j = 0;j < s.length();j++) {
              if (!valid(s.charAt(j))) {
                   return false;
         return true;
    }Beware though that this is considerably slower than using regular expressions. Also I didn't compile this example so there might be a small mistake you'll have to fix.

  • [Solved] Removing files with space in name.

    Hello!
    I have files named Feh wallpaper (exactly with space in name) and I was trying to remove it but i don't have any file manager and I remove files by rm.
    I was try rm -r feh_wallpaper and rm feh wallpaper and rm can't remove it
    Last edited by SpeedVin (2009-06-30 04:23:29)

    sHyLoCk wrote:
    SpeedVin wrote:Hello again i have a question how to copy files with space in neme i was trying /file but no succes and i have () in the name of file that's are a problem
    I can't rename it i got the same error when i want copy this file
    Did you try with quotes? and it is \file "\" is an escape sequence.
    Ohh thanks option with quotes work
    Last edited by SpeedVin (2009-07-15 11:23:16)

  • AD Powershell Create Computer objects with space in name

    Hi
    I noticed this when som hardware technician added a new computer for deployment in my MDT/SCCM frontend application.
    They by mistake entered a space character after the computername. The GUI way through DSA this does not work but in powershell it does.
    Should it be like this?
    New-ADComputer -Name "Testcomp3 " -SAMAccountName "Testcomp3 "

    No need to be rude.
    I've replicated this behavior and agree that this shouldn't be happening. You can always post a bug report on Connect:
    https://connect.microsoft.com/
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • How to delete file from server with space in name

    I am a novice, learned a little several years ago, but have to start all over again.
    I have set up the remote server (upload.comcast.net) without problems. I am unable to delete a file (file error:). I was able to upload the file, but cannot delete it. I figured out that that filename has a leading space. Now it's up on the server, but I cannot access it.
    Experiment:
    On the local folder, I deleted the leading space, and was able to upload, and delete it successfully. The original file remains unaccessible on the remote server.
    Thanks,
    Sonny

    Thanks for getting back so fast.
    Here is the error:
    /_4230151.ORF - error occurred - An FTP error occurred - cannot delete remote file _4230151.ORF.  Access denied.  The file may not exist, or there could be a permission problem.   Make sure you have proper authorization on the server and the server is properly configured
    As I mentioned before, I don't think that there is an authorization problem, as the changed name works fine, as does index.html
    What I do find interesting is that I was able to upload the file with the leading space. If I remember from several years ago, such a file would not even upload.
    I shutter to think of contacting Comcast. I think that they just give us the space with internet cable, but we are on our own with the website. Do you think that there might be some way to erase everything? I have only index.html up there, and don't mind starting over again.
    Sonny

  • How to include columns with a space in name in clientcontext load method in JSOM

    Hi Gurus,
    I have a situation where I need to read a list that has a column 'Repositary Name'.
    While I am reading the list in my JSOM I need to load this column in the clientcontext.load method.
    My code likes this below.
    this.collListItem = list.getItems(camlQuery);
        ctx.load(collListItem, 'Include(Title, 'Repositary Name')')
    The Issue is I can not load this 'Repositary Name' column. I tried with its internal name, removing the space, putting the name in single quote but nothing works.
    Please advice how to include a column in clientcontext.load method that has a space in its name .
    Changing the column is not a option and I have to have call it before I use it my Async Methods.

    Hi,
    If I am getting your issue correctly, I think you should put _x0020_ in place of space in your column name. In your case try Repositary_x0020_Name.
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote***

  • Recordset fields...hiding/ignoring spaces?  ASP/VB

    Hi,
    When you display a recordset field on a page, is there any
    way to remove
    spaces?
    For example, if we are displaying a name from a recordset,
    and in the
    database it's like this:
    J R Hartely
    ...is it possible to display this on the page as:
    JRHartely
    Also, if it was:
    J. R. Hartely
    ...is there any way to remove the full stops, and spaces,
    again to display
    like this:
    JRHartely
    Thanks in advance for any advice offered.
    Nath.

    Add this to the top of your page:
    <%
    Dim TextFilter
    Set TextFilter = New RegExp
    TextFilter.Pattern = "[^a-zA-Z]"
    TextFilter.Global = True
    TextFilter.IgnoreCase = False
    %>
    Now, whenever you want to display a field the way you've
    described, write it
    like this:
    <%=TextFilter.Replace(myRS.Fields.Item("MyField").Value,"")%>
    Just for good measure, at the bottom of your page, add this:
    <%
    Set TextFilter = Nothing
    %>
    "Nathon Jones" <[email protected]> wrote in
    message
    news:e9nn7t$nu1$[email protected]..
    > Hi,
    >
    > When you display a recordset field on a page, is there
    any way to remove
    > spaces?
    >
    > For example, if we are displaying a name from a
    recordset, and in the
    > database it's like this:
    > J R Hartely
    > ...is it possible to display this on the page as:
    > JRHartely
    >
    > Also, if it was:
    > J. R. Hartely
    >
    > ...is there any way to remove the full stops, and
    spaces, again to display
    > like this:
    > JRHartely
    >
    > Thanks in advance for any advice offered.
    > Nath.
    >

  • Searching LDAP with space in name

    All,
    I'm trying to write a package utilizing DBMS_LDAP that will take in an exchange distribution list as a VarChar2 and return a semi-colon delimitted list of member e-mails. So far, everything seems to be going well (though I haven't tested this part of my code yet), but I see that if I have a distribution list that contains spaces in the name (as some of our distribution lists do) then this could present a problem. What's the best way to get around this? Is there a one-space wild-card I can use to substitute for spaces in my Filter criteria?
    I'm developing on Oracle 11g.
    Thanks.

    All,
    Apologies for the late reply, but I got pulled to other projects last week.
    @ rp0428,
    My version is 11.2.0.2.0
    @ Purvesh, How does this help me pass a variable that contains spaces into the filter parameter of dbms_ldap.search_s? Seems like you provided an answer, but to a completely different question.
    @Verreynne, et. al
    Example below:
    Assuming you have an Exchange distribution list called 'EXCHANGE DISIT LIST WITH SPACES'
    Declare
    LDAP_HOST varchar2(100) := 'LDAP.MYAWESOMEDOMAIN.COM';
    LDAP_PORT number(10,0) := 3268;
    LDAP_USER varchar2(100) :='MYACCOUNT';
    LDAP_PSSWD VARCHAR2(100) :='MYACCOUNTPW';
    LDAP_USR_BASE VARCHAR2(100) := 'DC=MYAWESOMEDOMAIN,DC=Com';
    L_SESSION DBMS_LDAP.SESSION;
    Msg DBMS_LDAP.MESSAGE;
    L_RETVAL PLS_INTEGER;
    L_FILTER CLOB := '(CN=EXCHANGE DISIT LIST WITH SPACES)'; --here is where I have the problem.  I need to somehow pass this to the filter parameter of DBMS_LDAP.Search_S and have Msg return a pointer to the entries that meet this criteria;
    L_ATTRS DBMS_LDAP.STRING_COLLECTION;
    L_VALUES DBMS_LDAP.STRING_COLLECTION;
    BEGIN
    L_SESSION := DBMS_LDAP.INIT(LDAP_HOST, LDAP_PORT);
    l_retval := DBMS_LDAP.SIMPLE_BIND_S(LD => L_SESSION,
    DN => LDAP_USER,
    PASSWD => LDAP_PSSWD);
    IF L_RETVAL = DBMS_LDAP.SUCCESS THEN
    L_ATTRS(0) := 'member';
    L_RETVAL := DBMS_LDAP.SEARCH_S(LD => L_SESSION,
    BASE => LDAP_USR_BASE,
    SCOPE => DBMS_LDAP.SCOPE_SUBTREE,
    FILTER => L_FILTER,
    ATTRS => L_ATTRS,
    ATTRONLY => 0,
    RES => MSG);
    IF L_RETVAL = DBMS_LDAP.SUCCESS THEN
    MSG := DBMS_LDAP.FIRST_ENTRY(L_SESSION, MSG);
    L_VALUES := DBMS_LDAP.GET_VALUES(L_SESSION, MSG, 'member');
    for i in L_VALUES.FIRST..L_VALUES.LAST LOOP
    dbms_output.put_line(L_VALUES(i));
    END LOOP;
    MSG := DBMS_LDAP.NEXT_ENTRY(L_SESSION, MSG);
    END IF;
    END IF;
    L_RETVAL := DBMS_LDAP.UNBIND_S(L_SESSION);
    END;
    I'm beginning to think that the answer to my problem is that I have to get all group entries (REPLACE(L_FILTER,' ','*')) and iterate through them all to somehow match against what I'm intending to filter. Is this the best approach for my issue? If I must go down that route, is there something similar to the '?' wild-card that I can use for DBMS_LDAP.SEARCH_S, or am I stuck with using '*' ?
    Thanks in advance.
    Edited by: 929933 on Aug 7, 2012 11:27 AM

  • Color space/profile name

    I have some pictures that don't show a thumbnail in iPhoto. The info dialog for them says the Color Space is "Gray" and the Profile name is "Gr?skala - gamma 2,2". If I double-click on of these the enlarged image seems somewhat faded. The picture looks fine if I just view it directly in Preview, or ColorSync Utility. It seems most pictures have a Color Space of RGB, how to I change the Color Space of these files to RGB?

    Justin:
    Download the Automator application "Embed sRGB Profile" from Toad's Cellar and unzip it. Then locate the original files for those problem images and drop them on it. Next launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library and select the first three options. This should get those images compatible with iPhoto.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • [SOLVED]Audacious can't open files with spaces on name

    I open audacious
    Type Ctrl+o and select a directory with spaces on it names,
    Audacious opens nothing
    Any ideas?
    I have deep trees of music with spaces, I was working on a script to rename one by one, but I'm too lazy
    Cheers
    Last edited by geckos (2014-01-29 21:32:33)

    Here is my solution, I did this for every error that apears like that...
    [geckos@localhost ~]$ audacious
    (bootstrap.c:60) [mowgli_init]: mowgli_init() is a deprecated function, provided only for backwards compatibility with Mowgli-1. You should remove it if you no longer support using Mowgli-1.
    *** ERROR: /usr/lib/audacious/Input/cdaudio-ng.so could not be loaded: libcdio_cdda.so.1: cannot open shared object file: No such file or directory
    ^C[geckos@localhost ~]$
    [geckos@localhost ~]$ pkgfile -r '.*/libcdio_cdda.so.1'
    extra/libcdio-paranoia
    [geckos@localhost ~]$ sudo pacman -Syu libcdio-paranoia
    :: Synchronizing package databases...
    (3/3) installing libcdio-paranoia [###########################################] 100%
    [geckos@localhost ~]$
    [geckos@localhost ~]$

  • Tagging strategy: do you include spaces in names?

    I'm gearing up to perform the Big Tag Chore, and I'm hoping to get it mostly right the first time -- I'd be grateful for any suggestions/tips you might have to share.
    For example, if you tag somebody by full name is it a bad idea to include a space between the first and last name? Or, should I perhaps tag first and last names separately?
    Also, do you just leave the tag data in Lightroom, or do you write it all back into the image files themselves?
    Any other good suggestions I should keep in mind as I dig into this project?

    As you decide what's best for you, beware that LR doesn't handle keywords containing spaces very well:
    - In general, there's no way to search by exact keyword match in Smart Collections or the Filter Bar's text search. For example, there's no method to search for the keyword tag "Bob Smith". If you do "contains words: Bob Smith", you'll get images that have a keyword containing the word Bob and a keyword containing the word Smith, not necessarily in the same keyword; e.g. you could get a photo with keyword tags "Bob Johnson" and "Tom Smith". The only general method to search by exact keyword match is to use one or more Keyword columns in the Filter Bar, which can be painfully clumsy if you have more than a couple dozen keywords; there's no similar method for Smart Collections. (For any given search, you can add additional search terms to increase the likelihood of getting the desired results, but that can be painful and error-prone.)
    - On Windows, auto-complete of keywords in the Keywording > Keyword Tags pane doesn't handle spaces properly.  You can auto-complete on the first word of a keyword tag, but auto-completion stops after you type the space.
    - In the Keyword List > Filter Keyword box, filtering by multiple words will show all keyword tags containing any of the words, not all of the words. For example, filtering by "Bob Smith" will show all keyword tags containing Bob or Smith.
    To avoid these problems, some LR users have have avoided spaces in keyword tags (e.g. by using "_" instead).  That may be just fine for your needs, though if you export photos with those keywords, they may be unsuitable or just ugly in other applications or Web services that handle spaces just fine.  Alternatively, you could consider the Any Tag plugin, which better supports filtering and tagging with keywords containing spaces.

Maybe you are looking for