/ / Configuração do Visual SVN Server PowerShell - powershell, svn, visualsvn-server, visualsvn

Configuração do Visual SVN Server PowerShell - powershell, svn, visualsvn-server, visualsvn

Eu sou novo no Visual SVN PowerShell. Estou recebendo o seguinte erro quando abro o PowerShell em si.

Expressão ausente após o operador unário "-". Na linha: 1 char: 2 + -E <<<< xecutionPolicy Bypass -Arquivo C: Arquivos de Programas (x86) VisualSVN ServerShortcutStartup.ps1

Se eu usar qualquer cmdlets do Visual SVN Server, estou recebendo um erro informando que ele não é reconhecido como um cmdlet. Por favor ajude.

EDITAR: ShortcutStartup.ps1 contém o seguinte código.

$Host.UI.RawUI.WindowTitle = "VisualSVN Server PowerShell"

# Configure execution policy
Set-ExecutionPolicy -Scope Process Undefined -Force
if ($(Get-ExecutionPolicy) -eq "Restricted") {
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force
}

$env:Path = (Join-Path (Split-Path $MyInvocation.MyCommand.Path -Parent) "bin") + ";" + $env:Path

# Check PowerShell version
$major = 0
if (Test-Path variable:global:PSVersionTable) {
$major = $PSVersionTable.PSVersion.Major
}
if ($major -lt 3) {
Write-Warning "VisualSVN Server PowerShell module requires Windows PowerShell 3.0 or later."
exit
}

Write-Host ""
Write-Host "     Welcome to VisualSVN Server PowerShell!"
Write-Host ""
Write-Host " List of VisualSVN Server cmdlets: " -NoNewline
Write-Host "Get-Command -Module VisualSVN " -ForegroundColor Yellow
Write-Host " Get help for a cmdlet: " -NoNewline
Write-Host "help <cmdlet-name> " -NoNewline -ForegroundColor Yellow
Write-Host "or " -NoNewline
Write-Host "<cmdlet-name> -? " -ForegroundColor Yellow
Write-Host " Get online help for a cmdlet: " -NoNewline
Write-Host "help <cmdlet-name> -Online " -ForegroundColor Yellow
Write-Host ""

Respostas:

1 para resposta № 1

Módulo do VisualSVN Server PowerShell requer o PowerShell 3.0 ou mais recente. No entanto, você executa o PowerShell 1.0 no Windows Server 2008.

É um bug que o console do PowerShell não mostra um aviso sobre a versão do PowerShell não suportada. Ele mostra isso para o PowerShell 2.0, no entanto. Vou arquivar um bug e vamos corrigi-lo.

Você pode atualizar o PowerShell neste computador servidor seguindo as etapas especificadas em MSDN | Instalando o Windows PowerShell no Windows Server 2008.

Obrigado pelo relatório.