suiwenfeng
suiwenfeng

Reputation: 2003

powershell build-in function not recognized as the name of a cmdlet

The term 'Write-Host' 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.

The term 'New-Object' 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

aka:Write-Host is build-in function in powershell. how to find root cause of that issue?

Update

enter image description here

The same script works while executed in other dev machine.

update

I have tried to set max memory of powershell for single instance to 1GB, and set max memory of powershell for single user to 100M. It still not work.

Upvotes: 2

Views: 11215

Answers (1)

Vivek Athalye
Vivek Athalye

Reputation: 2979

Looks like there is a limit on number shell instances that can be run by a single user. Are you hitting that limit?

Ref: https://msdn.microsoft.com/en-us/library/ee309367(VS.85).aspx

MaxShellsPerUser: The maximum number of shells per user. The default is 30.

Upvotes: 3

Related Questions