Running Install-User for multiple computers

16 views
Skip to first unread message

jvu...@gmail.com

unread,
Dec 5, 2017, 12:48:45 PM12/5/17
to Carbon
Hello,

I am trying to add a local user account on multiple computers and using this string

Invoke-Command -ComputerName (Get-Content c:\serverlist.txt) -ScriptBlock { Install-User -Credential $lukeCredentials -UserCannotChangePassword -PasswordExpires }

If i run this command Install-User -Credential $lukeCredentials -UserCannotChangePassword -PasswordExpires by itself...it works as expected. However...if i call my serverlist.txt the script errors out with

The term 'Install-User' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
    + CategoryInfo          : ObjectNotFound: (Install-User:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    + PSComputerName        : ecw-devbox-p01

Any help would be greatly appreciated. 

Aaron Jensen

unread,
Dec 5, 2017, 3:11:47 PM12/5/17
to jvu...@gmail.com, Carbon
Most likely, Carbon isn't installed on one of the computers in `C:\serverlist.txt`. You'll need to install it on every computer in `C:\serverlist.txt`.

--
You received this message because you are subscribed to the Google Groups "Carbon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to carbonps+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/carbonps/29ec26e5-5e8d-49f1-aa1b-ea59e8f266e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages