About 10,700 results
Open links in new tab
  1. about_PSModulePath - PowerShell | Microsoft Learn

    To add a path to the user setting, use the following code: $key = (Get-Item 'HKCU:\Environment') $path = $key.GetValue('PSModulePath','','DoNotExpandEnvironmentNames') $path += …

  2. Set the PSModulePath variable on Linux - PowerShell 7

    Jan 3, 2023 · I am trying to update the PSModulePath variable on Linux (CentOS 7.9). I have tried: # Check current path(s) $env:PSModulePath /opt/microsoft/powershell/7-lts/Modules # …

  3. Tips for Writing Cross-Platform PowerShell Code

    Feb 14, 2019 · $env:Path [Environment]::GetEnvironmentVariable('Path') would return nothing on MacOS or Linux, because the path environment variable is PATH on those platforms. Since …

  4. Getting Started with PowerShell Core on Windows, Mac, and Linux

    Jun 9, 2017 · (However, it’s always a best practice to use variables like $pwd and $PSScriptRoot, and cmdlets like Split-Path/Join-Path to generate paths which conform to any given platform.) …

  5. Update PowerShell Module Path #1184 - GitHub

    Jun 23, 2016 · PowerShell requires a new module path that points to PowerShell Core modules rather than inbox PowerShell modules. %ProgramFiles%\PowerShell\Modules - Module path …

  6. About PowerShell Module Paths - What I learned today …

    One solution available to me was to update the value of PSModulePath in my [User] Environment Variable to add the \OneDrive\ segment into the entry for the MyDocuments folder. If I disable …

  7. Everything you wanted to know about PowerShell's Module Path.

    Nov 11, 2018 · For PowerShell Core on Linux run the following: $ env : PSModulePath = $ env : PSModulePath + ":/ModulePath" Screenshot of updated PSModulePath environment variable …

  8. Mastering PowerShell PSMODULEPATH: A Quick Guide

    `PSMODULEPATH` is an essential environmental variable in PowerShell that plays a critical role in managing and discovering modules. When you use PowerShell to run commands, it checks …

  9. Creating PowerShell Core scripts on Linux4sysops

    Aug 24, 2017 · Currently, PowerShell Core on CentOS has three directories in which to store modules: To make a module available to all users on my computer, I will store it in the …

  10. Demystifying Path Syntax for Stress-Free PowerShell Scripting

    Dec 27, 2023 · Follow these vital best practices working with paths in PowerShell: Favor absolute paths over relative to avoid confusion; Normalize paths with Resolve-Path to expand aliases ; …

  11. Some results have been removed
Refresh