MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.41k forks source link

Couple of issues with scripts in #registering-windows-server-or-windows-client-machine-to-a-recovery-services-vault #7029

Closed cubanp3te closed 6 years ago

cubanp3te commented 6 years ago

"PS C:> $Env:psmodulepath += ';C:\Program Files\Microsoft Azure Recovery Services Agent\bin\Modules" ... is missing a ' from the end in order for the line to run

"PS C:> $cred = $credspath + $credsfilename PS C:> Start-OBRegistration-VaultCredentials $cred -Confirm:$false" The above powershell results in a missing commandlet and the -VaultCredentials path is incorrect and not actually a path, the below works: "PS C:> Start-OBRegistration -VaultCredentials $credsfilename.FilePath -Confirm:$false"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AdamS-MSFT commented 6 years ago

@cubanp3te Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

NonSecwitter commented 6 years ago

I ran into a problem with the same step, although slightly different: It seems that the MARS Agent 2.0.9118.0 is not installing the Modules to "C:\Program Files\Microsoft Azure Recovery Services Agent\bin\Modules", or anywhere for that matter. Specifically: The MSOnlineBackup module is no longer installed, making this step impossible.

I can't find any information about changes to the MARS agent, but I also can't find any reason why the modules are missing. So, it seems this is either a situation where the MARS agent installer was changed and these docs need some updated information, or the docs are correct and I'm having some undocumented problem with the MARS agent.

I've checked every location where PowerShell would normally install a module, and they don't seem to be anywhere. I also can't find MSOnlineBackup on any repositories or download sites from MS.

OS: Server 2016 Standard DPM: 1801 MARS Agent: 2.0.9118.0

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.14393.2214
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.2214
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
saurabhsensharma commented 6 years ago

@cubanp3te Thanks for the feedback and apologies for the delay in responding. Acknowledging the issues you pointed out and confirming that I would be fixing these by 5/21.

@NonSecwitter We have not made changes to the MARS Agent that impact the MSOnlineBackup PS Module path. Are you able to locate the MARS Agent installation directory?

saurabhsensharma commented 6 years ago

@NonSecwitter please note that the article you referred to is the powershell article for MARS agent. Just saw that you are using DPM and the right doc for DPM is actually this one https://docs.microsoft.com/en-us/azure/backup/backup-dpm-automation .. Please try the same and let us know if you continue to face issues.

saurabhsensharma commented 6 years ago

please-close

NonSecwitter commented 6 years ago

@saurabhsensharma I've tried following the steps in both articles. The MARSAgentInstaller doesn't seem to be including the MSOnlineBackup module. This is across three servers so far, all using the link in the article you referenced. When browsing the agent installation directory, the modules folder is missing entirely.

saurabhsensharma commented 6 years ago

@NonSecwitter MARS Agent does not install the MSOnlineBackup module in the DPM or Azure Backup server installation. DPM instead exposes cmdlets like Start-DPMCloudRegistration for registering the server to Azure.

I see the source of the confusion, the DPM Article references Start-OBRegistration which actually should be replaced with Start-DPMCloudRegistration . Here is a detailed reference to the cmdlet : https://technet.microsoft.com/en-us/library/jj612787(v=sc.10).aspx . Can you please try with this cmdlet, while I edit and correct the doc? ETA for the fix to be available is 5/25.

saurabhsensharma commented 6 years ago

please-close

TravisCragg-MSFT commented 6 years ago

@cubanp3te We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

NonSecwitter commented 6 years ago

@TravisCragg-MSFT @saurabhsensharma I am doing another installation today. I follow the directions exactly as outlined until the step for Start-OBRegistration , which I replace with Start-DPMCloudRegistration and get this error:


> Start-DPMCloudRegistration -VaultCredentialsFilePath $credsfilename

Start-DPMCloudRegistration : Unable to read the vault credentials file provided. (ID: 34528)
Please download a new vault credentials file and try again.
At line:1 char:1
+ Start-DPMCloudRegistration -VaultCredentialsFilePath '.\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Start-DPMCloudRegistration], DlsException
    + FullyQualifiedErrorId : CBPUnableToReadVaultCredentialFile,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.Cl
   oudCmdlets.StartDPMCloudRegistration
Start-DPMCloudRegistration : Unable to read the vault credentials file provided. (ID: 34528)
Please download a new vault credentials file and try again.
At line:1 char:1
+ Start-DPMCloudRegistration -VaultCredentialsFilePath '.\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Start-DPMCloudRegistration], DlsException
    + FullyQualifiedErrorId : CBPUnableToReadVaultCredentialFile,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.Cl
   oudCmdlets.StartDPMCloudRegistration

I then tried to download the vault credentials again, without specifying -Backup when downloading vault credentials file, because this seems to be a different file format.

>Start-DPMCloudRegistration -VaultCredentialsFilePath $credsfilename

Start-DPMCloudRegistration : Invalid vault credentials provided. The file is either corrupted or doesnot have the
latest credentials associated with recovery service. (ID: 34513)
We recommend you to download a new vault credentials file from the portal and use it before 2 days from the day of
download.
At line:1 char:1
+ Start-DPMCloudRegistration -VaultCredentialsFilePath $credsfilename
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Start-DPMCloudRegistration], DlsException
    + FullyQualifiedErrorId : CBPUserInvalidVaultCredential,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.CloudCm
   dlets.StartDPMCloudRegistration
Start-DPMCloudRegistration : Invalid vault credentials provided. The file is either corrupted or doesnot have the
latest credentials associated with recovery service. (ID: 34513)
We recommend you to download a new vault credentials file from the portal and use it before 2 days from the day of
download.
At line:1 char:1
+ Start-DPMCloudRegistration -VaultCredentialsFilePath $credsfilename
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Start-DPMCloudRegistration], DlsException
    + FullyQualifiedErrorId : CBPUserInvalidVaultCredential,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.CloudCm
   dlets.StartDPMCloudRegistration
SaurabhSharma-MSFT commented 6 years ago

@cubanp3te We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.