Windows powershell

method115method115 Member Posts: 85 ■■□□□□□□□□
I'm using windows powershell to add new users. Whenever I press enter at the end of my command it simply puts >> as if it's expecting more commands but I don't know what else it wants. I followed the MCITP lab exactly so I don't know what the issue is.

Comments

  • undomielundomiel Member Posts: 2,818
    Without seeing the command you're entering make sure you're closing all quotes and brackets.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • rsuttonrsutton Member Posts: 1,029 ■■■■■□□□□□
    Some sort of a syntax error, posting the command would help.
  • method115method115 Member Posts: 85 ■■□□□□□□□□
    New-ADUser -Path "ou=User Accounts,dc=contoso,dc=com" -Name "Mary North"
    -SAMAccountName "mary.north" -UserPrincipalName "mary.north@contoso.com"
    -EmailAddress "mary.north@contoso.com" -GivenName "Mary" -Surname "North"
    -Description "Sales Representative in Australia"
    -Company "Contoso, Ltd." -Department "Sales"
    -Office "Sydney" -AccountPassword (ConvertTo-SecureString
    -AsPlainText "Pa$$w0rd" -Force)
    -ChangePasswordAtLogon $true -Enabled $true
    

    I went through the command twice and all quotation markets and brackets were closed.
  • IT ExplorerIT Explorer Member Posts: 59 ■■□□□□□□□□
    method115 wrote: »
    New-ADUser -Path "ou=User Accounts,dc=contoso,dc=com" -Name "Mary North"
    -SAMAccountName "mary.north" -UserPrincipalName "mary.north@contoso.com"
    -EmailAddress "mary.north@contoso.com" -GivenName "Mary" -Surname "North"
    -Description "Sales Representative in Australia"
    -Company "Contoso, Ltd." -Department "Sales"
    -Office "Sydney" -AccountPassword (ConvertTo-SecureString
    -AsPlainText "Pa$$w0rd" -Force)
    -ChangePasswordAtLogon $true -Enabled $true
    

    I went through the command twice and all quotation markets and brackets were closed.

    Did you use "Import-Module ActiveDirectory" at the begining ?
  • undomielundomiel Member Posts: 2,818
    In your -Path parameter change the double quote to a single quote.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • rjs_essexrjs_essex Member Posts: 57 ■■□□□□□□□□
    Did you use "Import-Module ActiveDirectory" at the begining ?

    As IT Explorer said, you need to import the AD cmdlets into the environment before you can call them. Did you do this?...
    WIP: 70-417, Security+, Project+, CCNA
  • ZartanasaurusZartanasaurus Member Posts: 2,008 ■■■■■■■■■□
    If he hadn't imported the AD mod, he'd get an error telling him the cmdlet was unrecognized. Anytime I've gotten the >> it's because of mismatched single or double quotes.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • rjs_essexrjs_essex Member Posts: 57 ■■□□□□□□□□
    If he hadn't imported the AD mod, he'd get an error telling him the cmdlet was unrecognized. Anytime I've gotten the >> it's because of mismatched single or double quotes.

    Good point :)
    WIP: 70-417, Security+, Project+, CCNA
  • method115method115 Member Posts: 85 ■■□□□□□□□□
    Thanks for the help guys never figured out what I did wrong. Closing and opening a new powershell fixed it though. I noticed other commands were not working with that same powershell session as soon as I opened a new one everything was working fine. I must have clicked a key or something that causes that to happen not sure.
Sign In or Register to comment.