on windows server 2008 r2 sp1 machine, used chocolatey install awstools.powershell package. this, in turn, installed powershell 3. now, powershell hopelessly broken , can't figure out way of fixing or uninstalling , reinstalling it.
i fear answer rebuilding machine, wanted ask if there's way fix it.
powershell runs, seems can't find of build-in cmdlets. seems find aliases, can't execute what's under them. example, issuing ls @ directory contents yields:
ps c:\users\administrator> ls ls : term 'get-childitem' not recognized name of cmdlet, function, script file, or operable program. check spelling of name, or if path included, verify path correct , try again. @ line:1 char:1 + ls + ~~ + categoryinfo : objectnotfound: (get-childitem:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception
it may there's execution of script missing @ start sets environment. if know more me , can offer assistance , can make don't have rebuild machine, happy.
a little bit late game, ran problem. found psmodulepath did not include important path. can view psmodulepath running command:
$env:psmodulepath
to add needed path can run command:
$env:psmodulepath = $env:psmodulepath + ";c:\windows\system32\windowspowershell\v1.0\modules\"
Comments
Post a Comment