Sethbartlett wrote:I'm guessing that when you are testing the commands locally, you are doing it within the Veeam Power shell console? It sounds like you need to do 1 of 2 things:
1. Run C:\Program Files\Veeam\Backup and Replication\Initialize-VeeamToolkit.ps1 to initialize the Veeam snap-in or
2. Run the command "Add-PSSnapin VeeamPSSnapIn" so you can use the Veeam powershell commands.
Enable-PSRemoting
Alexey D. wrote:To use Veeam PowerShell remotely you should perform these steps:
- install WinRM service (Windows Remote Management);
- type this command in PS console:
- Code: Select all
Enable-PSRemoting
Should work! Let us know if not.
Sethbartlett wrote:After connecting remotely, are you doing the Add-PSSnapin VeeamPSSnapIn command? Does it give you an error stating that it doesn't exist or what? Your connection outside of the Veeam box would not know about the commands without being using the snapin first.
$s = New-PSSession -Computername srvveeam02.internal.com.na
Enter-PSSession $s
Add-PSSnapin VeeamPSSnapIn
Get-VBRJob | where {$_.Name -eq "P1DR"} | Start-VBRJob -RunAsyncEnter-PSSession $s Invoke-Command -Session $s -ScriptBlock {
Add-PsSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
Get-VBRJob | where {$_.Name -eq "P1DR"} | Start-VBRJob -RunAsync
}
Invoke-Command -Session $s -ScriptBlock {
Add-PsSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
Get-VBRJob -Name "P1DR" | Start-VBRJob -RunAsync
}
Get-PSSession | Remove-PSSession
Users browsing this forum: No registered users and 1 guest