Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Add Host in NLB Cluster from Remote Server (Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)))

$
0
0

I am running command from Remote Server

invoke-command -computername server1 -filepath c:\host.ps1

Inside host.ps1

----------------------------------------

import-module "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\NetworkLoadBalancingClusters"


Get-NlbCluster | Add-NlbClusterNode -NewNodeName server2 -NewNodeInterface “Local Area Connection”

---------------------------------------------

Although this command works on server.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    + CategoryInfo          : PermissionDenied: (Microsoft.Netwo...dNlbClusterNode:AddNlbClusterNode) [Add-NlbClusterN
   ode], UnauthorizedAccessException
    + FullyQualifiedErrorId : AccessDenied,Microsoft.NetworkLoadBalancingClusters.PowerShell.AddNlbClusterNode


Viewing all articles
Browse latest Browse all 10624

Trending Articles