I've inherited a Windows Server 2003 r2 box. I've got a Powershell script that I'd need to get running on the machine, but something seems terribly wrong with the system. For example, opening a Powershell console and entering
ipconfig gets the following response:
The term 'ipconfig' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
My Powershell script is trying to call pscp.exe (from the putty project), and it gets the same error as above.
My first suspicion was that it was a path issue, and sure enough, when I opened up the environment variables window, the
PATH variable didn't even exist. So I created it, and made sure the directory containing
pscp was listed there. Still no dice.
Running the same commands (ipconfig, or pscp) in cmd.exe works as expected once I added some basic entries to the
PATH variable (%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;).
$env:path in Powershell returns the values of the
PATH variable, but powershell still won't execute programs that are in those directories.
get-host | select version returns 184.108.40.206.