PS C:\> cd cert:<o:p></o:p>
PS cert:\> dir<o:p></o:p>
Location :CurrentUser<o:p></o:p>
StoreNames :{TrustedPeople, _NMSTR, Trust, REQUEST...}<o:p></o:p>
<o:p> </o:p>
Location :LocalMachine<o:p></o:p>
StoreNames :{_NMSTR, Trust, REQUEST, TrustedPeople...}<o:p></o:p>
<o:p> </o:p>
PS cert:\> cd currentuser<o:p></o:p>
PS cert:\currentuser> dir<o:p></o:p>
<o:p> </o:p>
Name :TrustedPeople<o:p></o:p>
Name :_NMSTR<o:p></o:p>
Name :Trust<o:p></o:p>
Name :REQUEST<o:p></o:p>
Name :AuthRoot<o:p></o:p>
Name :ACRS<o:p></o:p>
Name :My<o:p></o:p>
Name :addressbook<o:p></o:p>
Name :Disallowed<o:p></o:p>
Name :CA<o:p></o:p>
Name :UserDS<o:p></o:p>
Name :Root<o:p></o:p>
Name :TrustedPublisher<o:p></o:p>
<o:p> </o:p>
PS cert:\currentuser> cd authroot<o:p></o:p>
PS cert:\currentuser\authroot> dir<o:p></o:p>
Directory:Microsoft.PowerShell.Security\Certificate::currentuser\authroot<o:p></o:p>
Thumbprint Subject<o:p></o:p>
---------- -------
F88015D3F98479E1DA553D24FD42BA3F43886AEF O=C&W HKT SecureNet CA SGC Root, C=hk<o:p></o:p>
F44095C238AC73FC4F77BF8F98DF70F8F091BC52 CN=Class 3TS Primary CA, O=Certplus, C=FR<o:p></o:p>
EF2DACCBEABB682D32CE4ABD6CB90025236C07BC O="Colegio Nacional de Correduria Publica Mexicana, A.C.", CN="Autoridad C...<o:p></o:p>
...
PS cert:\currentuser\authroot> get-childitem F88015D3F98479E1DA553D24FD42BA3F43886AEF<o:p></o:p>
Directory:Microsoft.PowerShell.Security\Certificate::currentuser\authroot<o:p></o:p>
Thumbprint Subject<o:p></o:p>
---------- -------
F88015D3F98479E1DA553D24FD42BA3F43886AEF O=C&W HKT SecureNet CA SGC Root, C=hk<o:p></o:p>
<o:p> </o:p>
PS cert:\currentuser\authroot> get-childitem F88015D3F98479E1DA553D24FD42BA3F43886AEF | format-list -property *<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
PSPath :Microsoft.PowerShell.Security\Certificate::currentuser\authroot\F88015D3F98479E1DA553D24FD42BA3F43<o:p></o:p>
886AEF<o:p></o:p>
PSParentPath :Microsoft.PowerShell.Security\Certificate::currentuser\authroot<o:p></o:p>
PSChildName :F88015D3F98479E1DA553D24FD42BA3F43886AEF<o:p></o:p>
PSDrive :cert<o:p></o:p>
PSProvider :Microsoft.PowerShell.Security\Certificate<o:p></o:p>
PSIsContainer :False<o:p></o:p>
Archived :False<o:p></o:p>
Extensions : {}
FriendlyName :CW HKT SecureNet CA SGC Root<o:p></o:p>
IssuerName :System.Security.Cryptography.X509Certificates.X500DistinguishedName<o:p></o:p>
NotAfter :10/16/2009 2:59:00 AM<o:p></o:p>
NotBefore :6/30/1999 3:00:00 AM<o:p></o:p>
HasPrivateKey :False<o:p></o:p>
PrivateKey :<o:p></o:p>
PublicKey :System.Security.Cryptography.X509Certificates.PublicKey<o:p></o:p>
RawData : {48, 130, 2, 235...}
SerialNumber : 00
SubjectName :System.Security.Cryptography.X509Certificates.X500DistinguishedName<o:p></o:p>
SignatureAlgorithm :System.Security.Cryptography.Oid<o:p></o:p>
Thumbprint :F88015D3F98479E1DA553D24FD42BA3F43886AEF<o:p></o:p>
Version : 1
Handle : 1577256
Issuer :O=C&W HKT SecureNet CA SGC Root, C=hk<o:p></o:p>
Subject :O=C&W HKT SecureNet CA SGC Root, C=hk<o:p></o:p>
在其他驱动器中导航<o:p></o:p>
除了文件系统、注册表和证书驱动器外,Windows PowerShell 还附带有几个其他有用的驱动器,其中包括别名 (Alias:)、环境提供程序 (Env:)、函数 (Function:) 和变量 (Variable:) 驱动器。使用相同的基本方法可以在这些驱动器中导航。<o:p></o:p> 关于 Windows PowerShell 驱动器<o:p></o:p>
Windows PowerShell 中扩展导航功能背后的概念是 Windows PowerShell 驱动器。
可以在 Windows PowerShell 的任何数据存储区中创建 Windows PowerShell 驱动器,而且它们可以具有任何有效名称,如 C: 或“My Drive”后跟冒号 (:)。可以使用在文件系统驱动器中所用的相同方法在这些驱动器中导航。但是,Windows PowerShell 驱动器仅在 Windows PowerShell 中是可见的。无法在 Windows 资源管理器或 Cmd.exe 中查看或访问它们。<o:p></o:p>
Windows PowerShell 附带有 Windows PowerShell 提供程序支持的数个有用驱动器。若要查看 Windows PowerShell 驱动器的列表,请键入:<o:p></o:p>
get-psdriv
也可以使用 New-PsDrive cmdlet 创建自己的 Windows PowerShell 驱动器。例如,若要创建名为“MyDocs:”的新驱动器(位于 My Documents 目录中),请键入: <o:p></o:p>
现在,可以像使用任何其他驱动器那样使用 MyDocs: 驱动器。可以将您的位置转到该驱动器,枚举其内容以及更改其属性。<o:p></o:p> 驱动器和提供程序<o:p></o:p>
Windows PowerShell 提供程序使 Windows PowerShell 中的驱动器可用于您的会话,这些提供程序是 .NET 程序集,它们使在专用数据存储区中的数据在 Windows PowerShell 中可用,以便您可以轻松地查看和管理该数据。有关 Windows PowerShell 提供程序的信息,请键入:<o:p></o:p>
get-help about_psprovider<o:p></o:p>
若要查看 Windows PowerShell 提供程序的列表,请键入:<o:p></o:p>
get-psprovide
有关提供程序帮助文件的列表,请键入:<o:p></o:p>
get-help -category provider<o:p></o:p>
有关特定提供程序的信息,请键入:<o:p></o:p>
get-help <提供程序名称><o:p></o:p>
例如,<o:p></o:p>
get-help registry<o:p></o:p>
<o:p> </o:p>
严禁抄袭和谢绝任何形式的私自转载,如需转载,请与本人联系,谢谢!<o:p></o:p>
好书推荐,精彩明天继续······<o:p></o:p>
向有一定开发经验的朋友们推荐两本.NET方面的经典著作,中文版在国内深受读者好评!<o:p></o:p>
1.《C#和.NET实战:平台、语言与框架》(原书名:Practical .Net2 and C#2: Harness the Platform, the Language, the Framework)<o:p></o:p>