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.