Import-CSV | New-ADGroup not working as expected with Powershell

I've looked all over and I can't seem to find an explanation for why this command works perfectly with New-ADUser but not with New-ADGroup.
These are commands I'm using:
For Users:
Import-CSV C:\Imports\adusers.csv | New-ADUser
This works great. All 500+ users imported with all fields.
For Groups:
Import-CSV C:\Imports\adgroups.csv | New-ADGroup
Only the first line is run correctly. Then I get this error: The specified group already exists
Here is a snip of my CSV for Groups:
Name,DisplayName,Description,GroupCategory,GroupScope,Path
DB Users,DB Users,Group for DB users,Global,"OU=Security Groups,OU=ABC Users,DC=domain,DC=local"
Accounting,Accounting,Access to the Accounting folder,Security,Global,"OU=Security Groups,OU=ABC Users,DC=domain,DC=local"
Am I missing something here or is this not possible?
THanks.

I knew I would figure this out as soon as I posted it...
This is the behavior you see if the SamAccountName field is not included.

Similar Messages

  • Adding and displaying a new JPanel -- not working as expected

    I'm starting my own new thread that is based on a problem discussed in another person's thread that can be found here in the New to Java forum titled "ActionListener:
    http://forum.java.sun.com/thread.jspa?threadID=5207301
    What I want to do: press a button which adds a new panel into another panel (the parentPane), and display the changes. The Actionlistener-derived class (AddPaneAction) for the button is in it's own file (it's not an internal class), and I pass a reference to the parentPane in the AddPaneAction's constructor as a parameter argument.
    What works: After the button is clicked the AddPaneAction's actionPerformed method is called without problem.
    What doesn't work: The new JPanel (called bluePanel) is not displayed as I thought it would be after I call
            parentPane.revalidate();  // this doesn't work
            parentPane.repaint(); 
    What also doesn't work: So I obtained a reference to the main app's JFrame (I called it myFrame) by recursively calling component.getParent( ), no problem there, and then tried (and failed to show the bluePanel with) this:
            myFrame.invalidate();  // I tried this with and without calling this method here
            myFrame.validate();  // I tried this with and without calling this method here
            myFrame.repaint();
    What finally works but confuses me: I got it to work but only after calling this:
            myFrame.pack(); 
            myFrame.repaint();But I didn't think that I needed to call pack to display the panel. So, what am I doing wrong? Why are my expectations not correct? Here's my complete code/SSCCE below. Many thanks in advance.
    Pete
    The ParentPane class:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class ParentPane extends JPanel
        private JButton addPaneBtn = new JButton("Add new Pane");
        public ParentPane()
            super();
            setLayout(new BorderLayout());
            setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            setBackground(Color.yellow);
            JPanel northPane = new JPanel();
            northPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            northPane.setBackground(Color.yellow);
            northPane.add(addPaneBtn);
            add(northPane, BorderLayout.NORTH);
            // add our actionlistener object and pass it a reference
            // to the main class which happens to be a JPanel (this)
            addPaneBtn.addActionListener(new AddPaneAction(this));
        public static void main(String[] args)
            javax.swing.SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createAndShowGUI();
        private static void createAndShowGUI()
            JFrame frame = new JFrame("test add panel");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(new ParentPane());
            frame.pack();
            frame.setVisible(true);
    } the AddPaneAction class:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    public class AddPaneAction implements ActionListener
        private JPanel parentPane;
        private JFrame myFrame;
        public AddPaneAction(JPanel parentPane)
            this.parentPane = parentPane;
         * recursively get the JFrame that holds the parentPane panel.
        private JFrame getJFrame(Component comp)
            Component parentComponent = comp.getParent();
            if (parentComponent instanceof JFrame)
                return (JFrame)parentComponent;
            else
                return getJFrame(parentComponent);
        public void actionPerformed(ActionEvent arg0)
            JPanel bluePanel = new JPanel(new BorderLayout());
            bluePanel.setBackground(Color.blue);
            bluePanel.setPreferredSize(new Dimension(400, 300));
            JLabel myLabel = new JLabel("blue panel label");
            myLabel.setForeground(Color.LIGHT_GRAY);
            myLabel.setVerticalAlignment(SwingConstants.CENTER);
            myLabel.setHorizontalAlignment(SwingConstants.CENTER);
            bluePanel.add(myLabel, BorderLayout.CENTER);
            parentPane.add(bluePanel);
            myFrame = getJFrame(parentPane);
            //parentPane.revalidate();  // this doesn't work
            //parentPane.repaint(); 
            //myFrame.invalidate(); // and also this doesn't work
            //myFrame.validate();
            //myFrame.repaint();
            myFrame.pack();  // but this does!?
            myFrame.repaint();
    }

    For me (as it happens I'm using JDK 1.5.0_04) your code appears to work fine.
    It may be that we're seeing the same thing but interpreting it differently.
    1. When I run your application with your "working" code, and press the button then the JFrame resizes and the blue area appears.
    2. When I run your application with your "not working" code and press the button then the JFrame does not resize. If I manually resize it then the blue area is there.
    3. When I run your application with your "not working" code, resize it first and then press the button then the JFrame then the blue area is there.
    I interpret all of this as correct behaviour.
    Is this what you are seeing too?
    Are you expecting revalidate, repaint, invalidate or validate to resize your JFrame? I do not.
    As an aside, I do remember having problems with this kind of thing in earlier JVMs (e.g. various 1.2 and 1.3), but I haven't used it enough recently to know if your code would manifest one of the previous problems or not. Also I don't know if they've fixed any stuff in this area.

  • ServiceDesk software not working as expected with new Firefox version

    After recently upgrading to Firefox 5.0, I have discovered that the ServiceDesk software I use with Firefox no longer works as expected. This software is ManageEngine ServiceDesk Plus 8.0. The problem is irratic but unique to Firefox. I don't have this problem with Chrome or IE.
    The problem is this: When I open an issue, several fields become active, one of which is the description field where the user who sent the issue typed the description of their problem. When editing the issue and the active fields become active, sometimes this description field is completely blank, meaning their description is gone, but not really. I have to close the page and try to re-open hoping this time, the description will be shown. Also, there is a tab for me to enter a resolution when I want to close it. I cannot enter anything in this field, or rather I can, but when I save it, nothing gets saved to this field, so the user doesn't get to see my resolution. The default font for ServiceDesk is Arial, but I know something is amiss because the default font is Times. If the font shows as Arial, then I know everything will be okay.

    I knew I would figure this out as soon as I posted it...
    This is the behavior you see if the SamAccountName field is not included.

  • Read Key and Write Key not working as expected with paths on RT

    The configuration file VIs Read Key (Path) and Write Key (Path) don't seem to work as expected (at least not as I was expecting them to) on an RT target.
    When working on my WinXP PC with these two VIs, paths are translated to what looks like is supposed to be a device-independent format before being written to disk. The path C:\dir\file.txt becomes /C/dir/file.txt when writing and vice versa when reading. On my RT target, however, that same path is written to disk as C:\dir\file.txt, unchanged from the native format.
    The translaton of a native path to and from the device-independent format appears to be the responsibility of Specific Path to Common Path and Common Path to Specific Path. These both use the App.TargetOS property to determine the operating system. In the case structure for these two VIs, however, there is no case for PharLap or RTX. (My RT hardware is runnng PharLap; I don't know enough about RTX to comment.) This means that the results of String to Path or Path to String are used without translating between the device-independent format to the native path format.
    This isn't a problem if you create a configuration file on one machine and use it on that same machine. I noticed this only when tranferring a config file from my PC to the RT target, where the target would not open the file paths it loaded from the configuration file.
    This occurs on 7.1.1 and 8.0.  I don't have 8.20 to see if happens there, too.

    In LV 8.2, this was fixed.
    The problem is App.TargetOS returns "Pharlap" on RT systems, and "Pharlap" is handled by the default case ("invalid OS target") in LV 8.0.  In LV 8.2 the default case is "Windows 95/NT", however.  The reason you could write and read an .ini file on RT in LV 8.0 and earlier is because these two VIs (listed below) were both running the default case of "invalid OS target".
    vi.lib\Utility\config.llb\Common Path to Specific Path.vi
    vi.lib\Utility\config.llb\Specific Path to Common Path.vi
    As you saw, this fails when you perform one operation in Pharlap but the other in Windows.  You can fix this by modifying the two VIs listed above.  Just go to the case structure and make "Windows 95/NT" the default case.

  • ITunes Import CD "Replace existing" not working as expected.

    iTunes 10.5.1 (42)
    To replicate problem:
    Import CD using AAC encoder / iTunes Plus setting. Audio files are created. E.g. "foo.m4a" 15MB in size
    Eject CD.
    Change import settings to Apple Lossless Encoder.
    Re-import CD using new settings.
    Dialog box appears stating songs already imported and asks if user wants to replace existing songs and import again.
    Select "Replace Existing" button.
    iTunes imports CD again and creates file "foo 1.m4a" 45MB in size and keeps existing file "foo.m4a".
    This is not how I would expect "Replace Existing" to behave. I'm expecting the original file to be deleted and replaced by the newly imported file.
    However I'm thinking that iTunes keeps the existing file because it has all of the metadata regarding play counts, etc and iTunes refers to this even though only the new version of the file shows on iTunes. If so, it's one way to fill up your hard drive.
    Any thoughts would be appreciated before I submit a bug report to Apple.
    Thanks.

    Still happening even with the latest version of iTunes. Appears to be random - sometimes it overwrites, sometimes it creates secondary copies. Frustrating!

  • N82 new battery not working as expected

    Hi
    I bought a new N82 BP-6MT battery. Now I see when the battery drops 1 bar from full, it skips through all the other bars and goes to only 1 bar remaining! This happens especially when I use a power hungry application, like games or GPS navigation.
    Is there something I can do about it? Is the battery faulty?

    Make sure you have a look at our Pool of Knowledge article regarding that subject:
    PoK - Maximize battery performance
    Especially the last tip may be interesting for you!   
    Message Edited by illinjah on 13-Dec-2009 12:32 AM
    By clicking the "Kudos!" or the "Solution?" button on the right you can say "Thank You" and you´ll show the author and others that the post is useful.
    The day we stop improving is the day we stop being good.

  • Search Results not working as expected with Site.URL Filter

    I have a page (SharePoint 2013 - Foundation) with a search Results web part. In that web part I have added a filter to limit the results to the specific site (and it's children). So my Query text is:
    {searchboxquery} Path:{Site.URL}*
    This works.. except for one thing. I'm guessing here but I think the "Site.URL" is returning the site that contains the search results page and not the site that actually started the search! 
    What I'm trying to do is mimic the default search behavior where a search only contains results from the current site down. So for example
    \sites\mySite\mySubSite
    If I'm on mySite and search, I should get everything from mySite + mySubSite. However if I am in the mySubSite when I search, I should only get results from mySubSite and NOT the parent mySite.
    Added info:
    the actual 'search center' is at the \sites\mysite level. Per MS documentation it states that {Site.URL} is the site from where the query was issued. To me that means that if I am on \mysite\mySubSite and initiate the search there, that it should only include
    results mySubSite which it is not doing
    Here is a screen shot.. I should not be getting any hits

    Hi,
    In SharePoint 2013, we could configure Result source to limit searched to certain content or to a subset of search results. This would be equal to a new search scope in SharePoint 2010.
    For your reference:
    http://technet.microsoft.com/library/jj683115(v=office.15)
    http://blogs.technet.com/b/tothesharepoint/archive/2012/10/09/build-a-specialized-search-experience-in-minutes-with-sharepoint-2013.aspx
    Using sample below will limit search result in subsite:
    {searchTerms} path:http://sp/sites/mysite/subsite
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Tabs not working as expected with centred text

    Hi,
    I'm trying to make a contents page in Indesign but having trouble with aligning the text correctly.
    I want the page titles to be centered but when I select the paragraph style onto centered the text moves away from the Tab stop keeping it in the right place - - the result of this is each page title in the column is in a slightly different place.  If I leave the paragraph style on left align the page title stays by the tab stop where I expect it to but I don't like how it looks!
    Note in the examples below how in the centered example the S has moved over to the right away from the Tab stop.
    Any suggestions?
    Many thanks,
    Adrian
    E.g.  left aligned
    e.g. 2  centered

    My first thought is that tabs don't mix well with centered text and you should use one or more fixed-width spaces between the number and the title, but I'm not really sure what look you want.

  • Hudson not working as expected with Polling SVN Change

    Hi John Stegeman,
    Thanks for the great OTN ADF essentials series. It is easy to follow and everything is light weight and working great except part 7 (http://www.oracle.com/technology/pub/articles/adf-development-essentials/part7.html).
    When I followed your setup with Poll SCM for once every minute for commits, the build is invoked once every minute even when no commits to SVN. The builds are all successful but in an infinite loop.
    I am using latest Hudson 1.349.
    How can I resolve this issue, i.e., to ensure that build only occurs when there is a commit?
    Mingsheng
    Edited by: mixie on Mar 10, 2010 7:48 AM

    Hi mixie,
    I've not seen this problem before on Hudson, but I have on other CI servers - one thing to check is to make sure the date/time on the SVN server and on the Hudson server are in sync - the time I saw this problem is when the times were out of sync and when the CI server asked SVN, "tell me whether there have been any commits since <last_build_time>" the answer was "yes" because <last_build_time> was far in the past.
    Otherwise, you might want to try asking on the [url http://wiki.hudson-ci.org/display/HUDSON/Mailing+List]Hudson Mailing List
    John

  • Xfa.host.print not working as expected with Reader8!?

    Hello,
    I have a two pages form created a while ago with Designer 7.1. When the Print button in the form is clicked, only the last page is printed. We now upgraded to Reader 8.0, and I tested my forms with it. All works fine except the print-out. It always prints both pages. It seems that the properties set in xfa.host.print are totally ignored. Any one having the same problem? Does somebody know the reason or a workaround for that?
    Thanks!
    Kind regards, Karin

    Hello Ivan,
    I got a response: It is a bug in Reader 8.0. It should be fixed in Reader 8.1
    Regards, Karin

  • ApplyVAT not working as expected with Incoming payment

    Using SAP B1 v9 PL11
    Following snippet:
                With oIncomingPayment
                    .DocDate = Strings.Left(dr("DTStamp"), 10)
                    .CardCode = dr("CardCode")
                    .ApplyVAT = SAPbobsCOM.BoYesNoEnum.tNO
                    .CashSum = totalPayment
                    .TransferSum = 0
                        With .Invoices
                            .DocEntry = InvNum
                            .InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_Invoice
                            .SumApplied = PaymentToApplyToInvoice 'SUM OF INVOICE
                            sumInvoices += PaymentToApplyToInvoice 'SUM OF INVOICE
                        End With
               End With
    There is no error code when doing the .Add()
    The Payment gets added (to ORCT) but ApplyVAT='Y" in the table even though CashSum and DocTotal are correct (i.e. same as the payment)
    SumApplied in the table RCT2 includes VAt and the invoice also gets closed even with a partial payment (and SumApplied gets automatically set to the total of the underlying Invoice in OINV).  When the next payment occurs then get error saying Invoice is closed.
    What am I doing wrong?

    Hi mixie,
    I've not seen this problem before on Hudson, but I have on other CI servers - one thing to check is to make sure the date/time on the SVN server and on the Hudson server are in sync - the time I saw this problem is when the times were out of sync and when the CI server asked SVN, "tell me whether there have been any commits since <last_build_time>" the answer was "yes" because <last_build_time> was far in the past.
    Otherwise, you might want to try asking on the [url http://wiki.hudson-ci.org/display/HUDSON/Mailing+List]Hudson Mailing List
    John

  • Silverlight 5 binding on a property with logic in its setter does not work as expected when debug is attached

    My problem is pretty easy to reproduce.
    I created a project from scratch with a view model.
    As you can see in the setter of "Age" property I have a simple logic.
        public class MainViewModel : INotifyPropertyChanged
                public event PropertyChangedEventHandler PropertyChanged;
                private int age;
                public int Age
                    get
                        return age;
                    set
                        /*Age has to be over 18* - a simple condition in the setter*/
                        age = value;
                        if(age <= 18)
                            age = 18;
                        OnPropertyChanged("Age");
                public MainViewModel(int age)
                    this.Age = age;
                private void OnPropertyChanged(string propertyName)
                    if (this.PropertyChanged != null)
                        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    In the MainPage.xaml 
         <Grid x:Name="LayoutRoot" Background="White">
                <TextBox 
                    Text="{Binding Path=Age, Mode=TwoWay}" 
                    HorizontalAlignment="Left"
                    Width="100"
                    Height="25"/>
                <TextBlock
                    Text="{Binding Path=Age, Mode=OneWay}"
                    HorizontalAlignment="Right"
                    Width="100"
                    Height="25"/>
            </Grid>
    And MainPage.xaml.cs I simply instantiate the view model and set it as a DataContext.
        public partial class MainPage : UserControl
            private MainViewModel mvm;
            public MainPage()
                InitializeComponent();
                mvm = new MainViewModel(20);
                this.DataContext = mvm;
    I expect that this code will limit set the Age to 18 if the value entered in the TextBox is lower than 18.
    Scenario: Insert into TextBox the value "5" and press tab (for the binding the take effect, TextBox needs to lose the focus)
    Case 1: Debugger is attached =>
    TextBox value will be "5" and TextBlock value will be "18" as expected. - WRONG
    Case 2: Debugger is NOT attached => 
    TextBox value will be "18" and TextBlock value will be "18" - CORRECT
    It seems that when debugger is attached the binding does not work as expected on the object that triggered the update of the property value. This happens only if the property to which we are binding has some logic into the setter or getter.
    Has something changed in SL5 and logic in setters is not allowed anymore?
    Configuration:
    VisualStudio 2010 SP1
    SL 5 Tools 5.1.30214.0
    SL5 sdk 5.0.61118.0
    IE 10
    Thanks!                                       

    Inputting the value and changing it straight away is relatively rare.
    Very few people are now using Silverlight because it's kind of deprecated...
    This is why nobody has reported this.
    I certainly never noticed this problem and I have a number of live Silverlight systems out there.
    Some of which are huge.
    If you want a "fix":
    private void OnPropertyChanged(string propertyName)
    if (this.PropertyChanged != null)
    //PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    Storyboard sb = new Storyboard();
    sb.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100));
    sb.Completed += delegate
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    sb.Begin();
    The fact this works is interesting because (I think ) it means the textbox can't be updated at the point the propertychanged is raised.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • AFS ARUN Size Substitution Not Working As Expected

    Hi All,
    I need help with this. If any one of you have worked with AFS ARUN size substitution, kindly provide me with some details on how can I set it up. I am specially interested in setting up size substitution with two-dimensional grids.
    I have setup some examples but it does not work as expected.
    Here is a small example:
    Say I have a size 28/30, 28/32 .........29/30....
    What I want to achieve is that during ARUN if there is a shortage of stock in 28/30 then the remaining requirement qty should be confirmed from size 28/32.
    with my setup after 28/30 it goes into looking for stock in 29/30, which is what I do not want.
    Any inputs will be really appreciated.
    Thanks!!

    srdfrn wrote:
    Hi YOS,
    I tried importing a PCX image into CVI 2010 and then sizing the image to the control and didn't see the behavior you have been describing.  Would you mind posting an example (alongside an image file) that demonstrates this?
    Also, one thing I noticed is that PCX images appear to be quite dated.  Could upgrading them to a JPEG or PNG format be an option for you?
    Thanks,
    Stephanie R.
    National Instruments
    Stephanie, thanks for the reply.
    I am very sorry to state that I made a mistake.
    VAL_SIZE_TO_IMAGE indeed works.
    What fails to work is VAL_SIZE_TO_PICTURE. (Second option in Fit Mode attribute in control editing panel)
    I tried with JPEG and it's the same.
    I am attaching an example.(Load_Image.c & ONEP_3Trow_POS1.JPG)
    A panel with two picture rings.
    - SW_1 remains at the intended size and the loaded picture is not clear.
    - SW_2 will fit to picture size and looks OK.
    Appreciate your support,
    YOSsi Seter
    Attachments:
    Load_Image.c ‏2 KB
    ONEP_3Trow_POS1.JPG ‏4 KB

  • Notification "Launch the app and go to the library" not working as expected

    Hello,
    we are sending notification "Launch the app and go to the library" - but it's not working as expected, it's still just launching app with last open folio.
    Whats wrong there? Do we need v30 app? We have V29, but this is not mentioned in documentation.
    Thanks
    Martin

    Ah.
    Ok, now it's clear.
    Anyway i would appreciate possibility to force viewer to switch to library view after new issue is detected, even without notification. Quite often requested feature - "there is new cover in Newsstand, but customer don't know how to download new publication easily".
    Martin

  • Container-Managed Transaction Type Attributes not working as expected

    I am having a problem with the container-managed transactions not working as expected. I have 2 methods that work as follows:
    MethodA{
    for(a lot)
    call MethodB;
    @Transaction Type = RequiresNew
    MethodB{
    EntityManager Persist to database
    I want the code in MethodB to be committed to the database when methodB returns. The problem is that I am running out of memory and MethodA is failing. When methodA fails after numerous calls to MethodB nothing is persisted to the database.
    It is my understanding that when using requires new transactions that a new transaction is started for each call to the method and ends when the method returns while the calling method transaction is suspended.
    How am I misunderstanding the requiresNew transaction attribute. What can I do to make a batch insert into my database that will not run out of memory (commit when a methodB returns)?
    Thanks in advance.

    The problem is that EJB invocation semantics for security, container-managed transactions, etc.
    only apply when an invocation is made through an EJB reference. In your case, you are directly
    invoking the implementation method from within the bean. The EJB container has no idea that's
    happening. It's no different than invoking a utility method.
    In order to get the behavior you'd like, you need to retrieve a reference to your own bean and invoke
    through that. You can use SessionContext.getBusinessObject() to get the EJB reference for the
    business interface through which the method in question is exposed.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Where are the Apple guys???? :(

    It seems that there are lot of people out here having essentially the same problem with their ipod mini: - Folder w/ exclamation point or Apple logo flashing - Computer can't detect device (whether through iTunes or MyComputer) - Device no longer cha

  • Grouping of Cleared Items

    Hi All, My user wants me to club all the cleared items togather, for example, suppose we have 10 open items in vendor account nowwhen i make the payment through F110 i'm generating one cheque only with one clearing document for all 10 open items but

  • Possible to use wired 10/100 ethernet for client device?

    I can't seem to find an answer to this question... I have a Airport Express that I connect to my stereo for streamed music in my living room. It's connected to my existing wireless network (Linksys WRT54G, WPA on). Works great. Airport Express is not

  • What's the equivalent Multiphase Data Pump in SSIS?

    hi to all I'm migrating a package from DTS to SSIS 2005. A DTS package performs a data transfer from source file to destination table. Precisely, this data transfer is implemented with a Multiphase Data Pump through an ActiveX script Task. The active

  • RRMS_MESSAGE_HANDLING

    Hi Experts, I am trying to use RRMS_MESSAGE_HANDLING for a customer exit variable and I am really not sure how to use it. My question is: How to define I_CLASS? The data element says this is Application Area. Can someone tell me wht this is? and how