Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having an issue running PowerShell 3.0 on Windows 7 64-bit. It takes a very long time to open/start when run it. It is also quite sluggish in response to just about anything.

I believe this may be due to the fact that my profile is stored in my documents, and the my documents folder is synched to our network.

Is there any way that I can move the location of my profile so that I can have it local instead of over the network?

share|improve this question
    
its slow for me too and my profile is on direct drive access. also it is read once, cached by OS and closed after startup so network or not it should affect nothing. this is just MS poor attempt at redoing the wheel, but square, yet again. –  v.oddou Nov 26 '13 at 1:13

2 Answers 2

PowerShell relies on the .NET Framework, you can try updating that.

This script also helped my speed

$Env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
  $pt = $_.Location
  if (! $pt) {continue}
  if ($cn++) {''}
  $na = Split-Path -Leaf $pt
  Write-Host -ForegroundColor Yellow "NGENing $na"
  ngen install $pt
}
share|improve this answer

There are a few different default places the Powershell profile can be stored.

  • The first location is the global location and would be useful when you want all users to have a customized Powershell profile. This profile should be placed in

    C:\WINDOWS\system32\WindowsPowerShell\v1.0\Profile.ps1
    
  • The second location is for the local profile and would be specific to each user account. This file overrides the global configuration file and should be placed in

    C:\Username\My Documents\WindowsPowerShell\Profile.ps1
    

As a test try modifying the global Powershell profile (located in system32) and see if that speeds things up. If it does you will know the slowness is somehow due to the network and you can move forward from there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.