Powershell New-object Command not reconized am i missing a module?


want configure high trusted app app dev in sharepoint, end need first insert commands in powershell editor :

    $publiccertpath = "c:\certs\hightrustsamplecert.cer" 
    $certificate = new-object system.security.cryptography.x509certificates.x509certificate2($publiccertpath)

using windows powershell on windows server 2012 r2 includes windows powershell 4 includes default new-object cmd-let... don't understand though, why doesn't system recognize command .... each time getting following error : new-object : term 'new-object' not recognized name of cmdlet.

every time open power shell displays me following error :

*select : term 'select-object' not recognized name of cmdlet,
function, script file, or operable program. check spelling of name, or
if path included, verify path correct , try again.
@ c:\program files\common files\microsoft shared\web server
extensions\15\config\powershell\registration\sharepoint.ps1:1 char:16
+ $ver = $host | select version
+                ~~~~~~
    + categoryinfo          : objectnotfound: (select-object:string) [], comma
   ndnotfoundexception
    + fullyqualifiederrorid : commandnotfoundexception
set-location : term 'set-location' not recognized name of a
cmdlet, function, script file, or operable program. check spelling of the
name, or if path included, verify path correct , try again
@ c:\program files\common files\microsoft shared\web server
extensions\15\config\powershell\registration\sharepoint.ps1:4 char:1
+ set-location $home
+ ~~~~~~~~~~~~
    + categoryinfo          : objectnotfound: (set-location:string) [], comman
   dnotfoundexception
    + fullyqualifiederrorid : commandnotfoundexception*

thought normal until today... have relation error?
, here hole (new-object) exception stack:

*new-object : term 'new-object' 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:16
+ $certificate = new-object
system.security.cryptography.x509certificates.x509cert ...
+                ~~~~~~~~~~
    + categoryinfo          : objectnotfound: (new-object:string) [], commandn
   otfoundexception
    + fullyqualifiederrorid : commandnotfoundexception*

can me please?

hi all,

here solution :

http://stackoverflow.com/questions/24576990/new-object-the-term-new-object-is-not-recognized-as-the-name-of-a-cmdlet

cordially.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...