The element that an operating system must have is the file system. In Windows, file systems can be managed using both Resource Manager and PowerShell, but they are different.
I. Structure of the file system
In Windows, the file system consists of three objects, disk drives, folders, and files, disk is the topmost object, the file is the smallest object, and the folder is a container.
650) this.width=650; "title=" screen Shot 2017-02-09 at 13.17.20.png "src=" http://image2.135editor.com/cache/remote/ Ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpel9wbmcvwkjpyuj5mgv5mlllqkrlwlbiawnjelvtawfoqu9bs2lidlznveiwawnkdnzcawfqbm85n2ljawjpy vpvqw1idxlfb0ngykm0q3hkdvfiumlinzhmtvg3zmdtm2ljqzljzy8w "alt=" screen Shot 2017-02-09 at 13.17.20.png "/>
For PowerShell, the file system is also a provider.
650) this.width=650; "title=" screen Shot 2017-02-09 at 13.31.28.png "src=" http://image2.135editor.com/cache/remote/ Ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpel9wbmcvwkjpyuj5mgv5mlllqkrlwlbiawnjelvtawfoqu9bs2lidlznwwljyzvwrkdatg9qtm9ptldwunnka Wnmbhzrtzfdb2tpy2ljzjl6t042awnnvm1regprawfervfjzk5rlza= "alt=" screen Shot 2017-02-09 at 13.31.28.png "/>
The "Drives" here refers to the psdrive created by PowerShell through a provider to connect to some of the media that stores the data. For example, "PS C:\Users\", the connection is the file system, so we can access the file system of objects--drives, folders and files. As a result, files and folders are not described in PS, but collectively called "Items".
Ii. use of the file system
"Set-location": Change path
650) this.width=650; "title=" screen Shot 2017-02-09 at 14.21.42.png "src=" http://image2.135editor.com/cache/remote/ Ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpel9wbmcvwkjpyuj5mgv5mlllqkrlwlbiawnjelvtawfoqu9bs2lidlznnm9ycfo0t1bmd1hzy2ljajbhdgliu mpom2libxhls0jpyvhinmpim0jswmzuq3vlow9my3bbagpsqs8w "alt=" screen Shot 2017-02-09 at 14.21.42.png "/>
The command effect is equivalent to "CD".
650) this.width=650; "title=" screen Shot 2017-02-09 at 14.26.28.png "src=" http://image2.135editor.com/cache/remote/ Ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpel9wbmcvwkjpyuj5mgv5mlllqkrlwlbiawnjelvtawfoqu9bs2lidlznrdzqb3nyv0tvqktjekztt21brhpjz Uy5otrxtlfqzwt2dmi1sndtbdk0mjzzdtg2nulvbfzblza= "alt=" screen Shot 2017-02-09 at 14.26.28.png "/>
The command context is switched to the registry. Although it is equivalent to "CD", but must be in the PS environment is equivalent, if the CMD environment is not.
650) this.width=650; "title=" screen Shot 2017-02-09 at 14.35.19.png "src=" http://image2.135editor.com/cache/remote/ ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpel9wbmcvwkjpyuj5mgv5mlllqkrlwlbiawnjelvtawfoqu9bs2lidlznugd2shyxelzlb2vmdjfwagvyawe5t 1zgsvhabjfhuzdsnm8xodixb3rxqjrau0fvohj2quk5dy8w "alt=" screen Shot 2017-02-09 at 14.35.19.png "/>
is to perform a "CD" command in the PS environment to switch to registry psdrive, if this is the case in the CMD environment:
650) this.width=650; "title=" screen Shot 2017-02-09 at 14.37.13.png "src=" http://image2.135editor.com/cache/remote/ Ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpel9wbmcvwkjpyuj5mgv5mlllqkrlwlbiawnjelvtawfoqu9bs2lidlznzhfkzws1mni1ahjmv2livg1obw1te etzrulqsg9qeetdn0e3dfvsrmtlowiwvnhfqjruq0lkus8w "alt=" screen Shot 2017-02-09 at 14.37.13.png "/>
"New-item": Creates a new item.
The "-type" parameter is required, otherwise an empty file (PS v5.0) is created by default under the file system.
650) this.width=650; "title=" screen Shot 2017-02-09 at 14.48.04.png "src=" http://image2.135editor.com/cache/remote/ Ahr0chm6ly9tbwjpei5xbg9nby5jbi9tbwjpel9wbmcvwkjpyuj5mgv5mlllqkrlwlbiawnjelvtawfoqu9bs2lidlznzwrwsdbkvhjatxbozu5yegf6wxnhm Ndpyuvveexwdwgys3hydlhurm90bxdfytc4d2ljvnfxawfrlza= "alt=" screen Shot 2017-02-09 at 14.48.04.png "/>
This article from the "China Polar Road" blog, reproduced please contact the author!
PowerShell Learning notes-File system