Skip to content

Instantly share code, notes, and snippets.

@CN-CODEGOD
Created January 9, 2025 11:06
Show Gist options
  • Save CN-CODEGOD/ec1b21c5647c16852462f99d47dc0a42 to your computer and use it in GitHub Desktop.
Save CN-CODEGOD/ec1b21c5647c16852462f99d47dc0a42 to your computer and use it in GitHub Desktop.
利用模组Windows terminal 命令行导入文件profile等
模组写入:
foreach ($file in Get-ChildItem "Public"|Where-Object{$_.Name -like "*.ps1"}) {
. $file.FullName
}
写入windows terminal命令行:
c:\Program Files\PowerShell\7-preview\pwsh.exe -noprofile -noexit /c import-module "C:\Users\Adminnistrator\demo\shell\wt\ezshell\ezshell.psm1"
复制的时候在开始菜单创建Public文件夹,并在public文件夹中写入要导入的文件
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment