Set-Alias ngen (Join-Path ([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) ngen.exe)
[AppDomain]::CurrentDomain.GetAssemblies() |
sort {Split-path $_.location -leaf} |
%{
$Name = (Split-Path $_.location -leaf)
if ([System.Runtime.InteropServices.RuntimeEnvironment]::FromGlobalAccessCache($_))
{
Write-Host "Already GACed: $Name"
}else
{
Write-Host -ForegroundColor Yellow "NGENing : $Name"
ngen $_.location | %{"'t$_"}
}
}
Fonte --- Faça o download do código como arquivo ps1
If the workstation has no direct internet access unmark this option in
IE: 'Check for publisher's certificate revocation' under advanced
You might want to double-check and verify there are no profiles. Run
this command and see if any of these are true:
PS S:> $profile.CurrentUserAllHosts, $profile.CurrentUserCurrentHost,
$profile.AllUsersAllHosts, $profile.AllUsersCurrentHost | test-path
Fonte
Citação levemente editada do original
The problem [could be due to] slow setting of user environment
variables. I recently merged a change that uses a temp file instead.
Origem
Mais sobre o ambiente do usuário as variáveis podem ser encontradas aqui que também sugere que pode ser o Chrome nos comentários:
Apparently it's Google Chrome that's the culprit here. If I close Chrome, the operation completes in a couple of seconds. Wonder why Chrome lets those messages time out.
I guess this might require digging into Chrome code... Another idea is that Chrome application usually runs in dozens of processes, each tab and extension is in a separate one. Perhaps, the more tabs open/extensions you have, the more time it will take to process the system message.
Como a sua falha é demorar um pouco para carregar inicialmente (mas rápido depois), tente
...then you are seeing the time it takes to load .NET, PSH and Snapins. If not, then likely to be profile related (either PSH profile or something like contacting AD1).'
Source