Hi,
i will now explane two case that i tested:
In the first case i login on the Veeam Server and i execute the command on the cmd prompt windows (NOT launching PowerShell from Veeam B&R Interface).
In the second case i will do the same but i start an SSH connection to the Veeam Server from a remote client.
Case1:
- LogIn to the server with the user "veeam" (the user is the installation user for veeam and is in the Administrators group)
- Start cmd prompt
- Start powershell
Code: Select all
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Veeam>powershell
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\Veeam>
- check which SnapIn are loaded
Code: Select all
PS C:\Users\Veeam> Get-PSSnapin
Name : Microsoft.PowerShell.Diagnostics
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains Windows Eventing and Performance Counter cmdlets.
Name : Microsoft.WSMan.Management
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets (such as Get-WSManInstance and Set-WSManInstance) that a
re used by the Windows PowerShell host to manage WSMan operations.
Name : Microsoft.PowerShell.Core
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell.
Name : Microsoft.PowerShell.Utility
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains utility Cmdlets used to manipulate data.
Name : Microsoft.PowerShell.Host
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets (such as Start-Transcript and Stop-Transcript) that are
provided for use with the Windows PowerShell console host.
Name : Microsoft.PowerShell.Management
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains management cmdlets used to manage Windows components.
Name : Microsoft.PowerShell.Security
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets to manage Windows PowerShell security.
- check which SnapIn are registered
Code: Select all
PS C:\Users\Veeam> Get-PSSnapin -registered
Name : SqlServerCmdletSnapin100
PSVersion : 2.0
Description : This is a PowerShell snap-in that includes various SQL Server cmdlets.
Name : SqlServerProviderSnapin100
PSVersion : 2.0
Description : SQL Server Provider
Name : VeeamPSSnapIn
PSVersion : 2.0
Description : This is a PowerShell snap-in that includes the Veeam's cmdlet.
Now i see that "VeeamPSSnapIn" in already registered and i can load it.
Code: Select all
PS C:\Users\Veeam> Add-PSSnapin VeeamPSSnapIn
PS C:\Users\Veeam>
Now if i re-check the loaded SnapIns i find the new one
Code: Select all
...
...
Name : Microsoft.PowerShell.Host
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains cmdlets (such as Start-Transcript and Stop-Transcript) that are
provided for use with the Windows PowerShell console host.
Name : Microsoft.PowerShell.Management
PSVersion : 2.0
Description : This Windows PowerShell snap-in contains management cmdlets used to manage Windows components.
Name : VeeamPSSnapIn
PSVersion : 2.0
Description : This is a PowerShell snap-in that includes the Veeam's cmdlet.
Now when i try to run a VBR cmdlet, for example
it work.
This case work as expected
Case2:
- login from my client to the Veeam Server through SSH:
Code: Select all
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd C:\Users\Veeam
C:\Users\Veeam>powershell
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
$
PS C:\Users\Veeam>
- check which SnapIn are loaded
--> same result like "Case1"
- check which SnapIn are registered
Code: Select all
PS C:\Users\Veeam> Get-PSSnapin -registered
--> no output.
i try to register the VeeamPSSnapin:
Code: Select all
PS C:\Users\Veeam> set-alias installutil C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe
PS C:\Users\Veeam> installutil 'C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll'
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.5420
Copyright (c) Microsoft Corporation. All rights reserved.
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll assembly's progress.
The file is located at C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.InstallLog.
Installing assembly 'C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll'.
Affected parameters are:
assemblypath = C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll
logfile = C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.InstallLog
logtoconsole =
The Install phase completed successfully, and the Commit phase is beginning.
See the contents of the log file for the C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll assembly's progress.
The file is located at C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.InstallLog.
Committing assembly 'C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll'.
Affected parameters are:
assemblypath = C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll
logfile = C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.InstallLog
logtoconsole =
The Commit phase completed successfully.
The transacted install has completed.
In the log Veeam.Backup.PowerShell.InstallLog i found:
Code: Select all
Committing assembly 'C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll'.
Affected parameters are:
assemblypath = C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.dll
logfile = C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.PowerShell.InstallLog
logtoconsole =
I try Get-PSSnapin -registered return no output... and no VBR cmdled work..
This was an update about my problem.
I will try something other.
@Sethbartlett: Remote PS will i try later, thank you
Regards
Diego