1. Microsoft store 下载安装PowerShell
    2. 安装模块

      1. 在线安装

        1. install-module posh-git
        2. install-module oh-my-posh
      2. 离线安装

        1. 模块下载地址:https://www.powershellgallery.com/packages
        2. 将模块 .nupkg 文件扩展名替换为 .zip 并解压
        3. 在Power Shell的模块安装目录(C:\Users\sunzhengbo\Documents\PowerShell\Modules)下安装模块的名称和版本号新建对应层级的目录,并将模块解压的文件拷贝至此,目录结构见下图
          1. Modules exa -T
          2. .
          3. ├── oh-my-posh
          4. └── 6.4.3
          5. ├── bin
          6. ├── posh-darwin-amd64
          7. ├── posh-linux-amd64
          8. ├── posh-linux-arm
          9. ├── posh-linux-arm64
          10. ├── posh-windows-386.exe
          11. ├── posh-windows-amd64.exe
          12. └── posh-windows-arm64.exe
          13. ├── deploy.ps1
          14. ├── oh-my-posh.psd1
          15. ├── oh-my-posh.psm1
          16. ├── README.md
          17. └── themes
          18. ├── agnoster.omp.json
          19. ├── agnosterplus.omp.json
          20. ├── aliens.omp.json
          21. ├── amro.omp.json
          22. ├── avit.omp.json
          23. ├── blue-owl.omp.json
          24. ├── blueish.omp.json
          25. ├── bubbles.omp.json
          26. ├── bubblesline.omp.json
          27. ... ...
    3. 编辑配置文件:notepad $profile

      1. Import-Module posh-git
      2. Import-Module oh-my-posh
      3. Set-PoshPrompt -Theme spaceship