Test-Path's -Credential parameter - is it ever used?


the following from
http://technet.microsoft.com/en-us/library/dd315298.aspx

description test-path cmdlet ...
parameters -credential <pscredential>
this parameter not supported providers installed windows powershell.

what providers use -credential ?

is used in future?

the best doc can find on at
http://blogs.technet.com/b/heyscriptingguy/archive/2011/04/03/discover-which-powershell-providers-support-credentials.aspx 

 

 

hi larry,

in ps 2.0 wsman provider support credentials.

 

ps c:\> get-psprovider  name                 capabilities ----                 ------------ wsman                credentials alias                shouldprocess environment          shouldprocess filesystem           filter, shouldprocess function             shouldprocess registry             shouldprocess, transactions variable             shouldprocess certificate          shouldprocess 

you can bypass using start-job or start new process other credentials:

ps c:\> test-path p:\test\ps.txt -credential $cred provider not support use of credentials. perform operation again without specifying credentials. @ line:1 char:1 +  <<<< test-path p:\test\ps.txt -credential $cred     + categoryinfo          : notimplemented: (:) [], psnotsupportedexception     + fullyqualifiederrorid : notsupported  ps c:\> start-job -scriptblock {test-path p:\test\ps.txt} -credential $cred | wait-job | receive-job true




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client