Skip to content

Instantly share code, notes, and snippets.

@CN-CODEGOD
Created September 15, 2024 06:21
Show Gist options
  • Save CN-CODEGOD/7114970e0e9082f888456c03ea16f26b to your computer and use it in GitHub Desktop.
Save CN-CODEGOD/7114970e0e9082f888456c03ea16f26b to your computer and use it in GitHub Desktop.
powershell系统环境变量合集转换为数组
# 获取系统环境变量 PATH 并将其拆分为数组
$pathArray = $env:PATH -split ';'
# 输出数组内容
$pathArray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment