Windows powershell
method115
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
-
undomiel Member Posts: 2,818Without 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/
-
method115 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 Explorer Member Posts: 59 ■■□□□□□□□□
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 ? -
undomiel Member Posts: 2,818In your -Path parameter change the double quote to a single quote.Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
-
rjs_essex Member Posts: 57 ■■□□□□□□□□IT Explorer wrote: »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 -
Zartanasaurus 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_essex Member Posts: 57 ■■□□□□□□□□Zartanasaurus wrote: »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 pointWIP: 70-417, Security+, Project+, CCNA -
method115 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.