Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Use invoke-command to query a dpm server

$
0
0

I had errors when trying to query my dpm server, using "invoke-command". But I can interrogate other servers, with the same method.

I think it's related to some of the specifics of DPM.

Your helpers, please.
Thank you in advance!

:

PS C:\Windows\system32> begin
    {  
        Enable-PSRemoting -Force
        [System.Management.Automation.PSCredential]$_session = Get-Credential xxxx\administrateur 
    }

    process
    {
        Enter-PSSession -ComputerName "xxxx-dpm6.xxxx.fr" -Credential $_session
        get-dpmdatasource
    }
get-dpmdatasource : The term "get-dpmdatasource" is not recognized as a cmdlet name, function, script file, or executable program. Check the spelling of the name, or if a path
exists, check that the path is correct and try again.
          Ligne:10 : 9
+         get-dpmdatasource
+         ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (get-dpmdatasource:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 

[xxxx-dpm6.xxxx.fr]: PS C:\Users\administrateur.xxxx\Documents> 

///////////////////////////////////////////////////////////////////another method

PS C:\Windows\system32> begin
    {  
        Enable-PSRemoting -Force
        [System.Management.Automation.PSCredential]$_session = Get-Credential xxxx\administrateur 
    }

    process
    {
       Invoke-Command -ComputerName xxxx-dpm6 -Credential $_session  -ScriptBlock { get-dpmdatasource}
    }
Warning : Connecting to the DPM server : xxxx-DPM6.xxxx.fr
Can not connect to xxxx-dpm6.xxxx.fr. (ID : 948)
Verify that the DPM service is running on this computer.
    + CategoryInfo          : NotSpecified: (:) [Get-DPMDatasource], DlsException
    + FullyQualifiedErrorId : ConnectionToServerFailed,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.Common.GetDatasource
    + PSComputerName        : xxxx-dpm6

PS C:\Windows\system32> 


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>