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