Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Profiles

Direct answer

A PowerShell profile is a script that can run when a supported PowerShell host starts. Multiple profile paths can exist for current user/all users and current host/all hosts, and Windows PowerShell and PowerShell 7 can use different profile locations/contexts.

When to use this

Use this topic when aliases/functions/modules/settings appear only in interactive shells, scripts behave differently with -NoProfile, startup is slow/failing, or automation accidentally depends on personal profile state.

First 30 seconds

1. $PROFILE | fl * -Force — profile paths.

2. Exists? Test-Path $PROFILE.

3. Slow start → time it: pwsh -NoProfile vs normal.

4. Errors at startup → open the profile file.

5. Remote sessions do not load profiles.

Operational verification

PowerShell starts → loads AllUsers and CurrentUser profiles → aliases/functions available

Evidence · next step

Isolate the changed command/module/variable and retest in a clean explicit environment.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

Do not copy a personal profile wholesale to servers. Do not store credentials/secrets directly in profile text. Avoid defining aliases that shadow critical command names in managed environments without clear documentation.

Platform / version applicability
Windows execution, automation and observability
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows execution, automation and observability
Scope / prerequisiteUse this topic when aliases/functions/modules/settings appear only in interactive shells, scripts behave differently wi…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Reproduce an issue using -NoProfile. If behavior changes, inspect profile paths and bisect the profile content/modules. Compare command resolution and relevant variables before/after profile load. Move necessary operational initialization into version-controlled code.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Profiles customize sessions; they should not be hidden production dependencies.
  • $PROFILE exposes the current host/current user path and additional profile-path properties.
  • Different hosts/PowerShell products may load different profile files.
  • Unattended/scheduled/remoting contexts may not load the same profile behavior as an interactive console.
  • -NoProfile is a strong differential test for profile-caused behavior.
Key checks
  • $PSVersionTable — PowerShell edition and version
  • Get-Command <name> — which cmdlet/function/exe runs
  • Get-Help <cmdlet> -Full — syntax and parameters
  • Get-ExecutionPolicy -List — execution policy per scope
ReferenceWhat it is1 section · depth on demand

Core model

Profiles are ordinary PowerShell scripts loaded during session startup according to host/user scope. They can define functions, aliases, prompt customizations, environment changes and module imports. This convenience can create reproducibility problems when a production script silently depends on them.

ReferenceImportant terms & boundaries2 sections · depth on demand

PowerShell boundary

Windows PowerShell and PowerShell 7 are separate products, so profile locations and loaded modules can differ even for the same user. Automation should explicitly import required modules and set required options rather than assuming the operator profile prepared the session.

In depth

Profiles are scripts run at PowerShell start:

VariableScope
$PROFILE.CurrentUserCurrentHostThis user, this host (default $PROFILE)
$PROFILE.CurrentUserAllHostsThis user, all hosts
$PROFILE.AllUsersAllHostsEveryone
Test-Path $PROFILE; notepad $PROFILE
$PROFILE | Get-Member -Type NoteProperty | % { $PROFILE.($_.Name) }
pwsh -NoProfile -File script.ps1      # skip profiles in automation

Keep profiles light (slow startup) and never rely on them in scheduled scripts.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows execution, automation and observability current

Authoritative/upstream documentation reviewed for bounded claims in PowerShell → Profiles. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/powershell/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
powershell profilespowershell $profilepowershell noprofilepowershell startup profile
Embedded reference data

Quick lookup tables

PowerShell → Profiles reference map

Fast lookup boundaries for PowerShell → Profiles.

ItemMeaningEvidence boundary
CurrentUserCurrentHostMost specific common profilehost/product-specific path
CurrentUserAllHostsUser-wide customizationstill user-context dependent
AllUsers profilesMachine-level startup customizationrequires managed change control
-NoProfileDifferential startup testdoes not remove other session/environment differences
Explicit module/scriptReproducible dependencypreferred over hidden profile dependency
Confirmation

Confirm action

Continue?