Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Sample Provider - Show Progress and Other Attributes

Step 1- Install SHiPS

Follow the instructions in here to download and install the SHiPS.

Step 2 - Review the sample code

See the ShowProgress module.

Step 3 - Try it out

Import-Module  SHiPS
Import-Module  .\samples\ShowProgress
new-psdrive -name n -psprovider SHiPS -root ShowProgress#NoBuiltinProgress

cd n:
dir
dir -verbose

Key takeaways from this example

  • By default SHiPS is not caching data returned from Get-ChildItem

  • Sometimes it can be slow when you accessing data store especially through the Internet, you may want to cache the data for better user experience. To do so, you can add an attribute to your class, e.g.,

    [SHiPSProvider(UseCache=$true)]
  • By default SHiPS shows progress. However you can disable it by adding the following attribute:

    [SHiPSProvider(BuiltinProgress= $false)]
  • If needed, you can add Write-Progress in your PowerShell module.