Enable-PSRemoting failing

Hi,

I am executing a power shell script from webrole to restore database backup file from network shared folder to other VM in same network. First it copies backup file to local path on the VM using Copy-Item, then restore. I did use Double-Hop mechanism to delegate the user. more details here

I have following power shell script

Enable-PSRemoting -Confirm:$false -Force
    Enable-WSManCredSSP -Role Client -DelegateComputer 'abc.domain.com' Force
    $securepw = ConvertTo-SecureString 'Password' -asplaintext -force
    $cred = new-object -typename System.Management.Automation.PSCredential -ArgumentList 'user@domain.com', $securepw
    # Create and use session
    $session = New-PSSession -credential $cred -ComputerName $CompupterNameURL
    Invoke-Command -Session $session -ScriptBlock {Enable-WSManCredSSP -Role Server -Force}
    Invoke-Command -ComputerName $CompupterNameURL -Authentication Credssp -Credential $cred -ScriptBlock ${function:RestoreSQLDatabase}
    Invoke-Command -Session $session -ScriptBlock {Disable-WSManCredSSP -Role Server}

getting below error at very first line

Set-WSManQuickConfig : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2" Machine="localhost"><f:Message><f:ProviderFault provider="Config provider" 
path="%systemroot%\system32\WsmSvc.dll"><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2" Machine="RD000D3A900D25"><f:Message>Unable to check the status of the firewall. 
</f:Message></f:WSManFault></f:ProviderFault></f:Message></f:WSManFault>
At line:69 char:17
+                 Set-WSManQuickConfig -force
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand

Both file server and targent VM are in same network and domain joined, but web role is in same network but not domain joined.

I found a hot fix here for this issue, but its not working for Windows Server 2012 R2

how can we Enable-Psremoting on web role ? could anyone su

August 26th, 2015 6:56am

Hi,

 Refer to the following article on how to configure Powershell Remoting
 http://www.davidaiken.com/2011/01/12/enable-powershell-remoting-on-windows-azure/
 
 Also the below stackOverFlow thread discussing similar issues.
 http://stackoverflow.com/questions/21561992/enable-powershell-remoting-on-new-azure-vm
 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e95ab36c-f2a5-425f-8d8a-dee08f25f992/can-i-enable-credssp-from-a-web-or-worker-role?forum=windowsazuredevelopment

Regards,
Nithin Rathnakar

August 26th, 2015 4:46pm

Hi,

 Refer to the following article on how to configure Powershell Remoting
 http://www.davidaiken.com/2011/01/12/enable-powershell-remoting-on-windows-azure/
 
 Also the below stackOverFlow thread discussing similar issues.
 http://stackoverflow.com/questions/21561992/enable-powershell-remoting-on-new-azure-vm
 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e95ab36c-f2a5-425f-8d8a-dee08f25f992/can-i-enable-credssp-from-a-web-or-worker-role?forum=windowsazuredevelopment

Regards,
Nithin Rathnakar

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 4:46pm

Hi,

 Refer to the following article on how to configure Powershell Remoting
 http://www.davidaiken.com/2011/01/12/enable-powershell-remoting-on-windows-azure/
 
 Also the below stackOverFlow thread discussing similar issues.
 http://stackoverflow.com/questions/21561992/enable-powershell-remoting-on-new-azure-vm
 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e95ab36c-f2a5-425f-8d8a-dee08f25f992/can-i-enable-credssp-from-a-web-or-worker-role?forum=windowsazuredevelopment

Regards,
Nithin Rathnakar

August 26th, 2015 4:46pm

Hi,

 Refer to the following article on how to configure Powershell Remoting
 http://www.davidaiken.com/2011/01/12/enable-powershell-remoting-on-windows-azure/
 
 Also the below stackOverFlow thread discussing similar issues.
 http://stackoverflow.com/questions/21561992/enable-powershell-remoting-on-new-azure-vm
 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e95ab36c-f2a5-425f-8d8a-dee08f25f992/can-i-enable-credssp-from-a-web-or-worker-role?forum=windowsazuredevelopment

Regards,
Nithin Rathnakar

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 4:46pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics