当我尝试在远程计算机上获取服务信息时,我收到了WINRM错误。
PS C:\Windows\system32> invoke-command -computername Node1 -ScriptBlock {gsv}
[Node1] Connecting to remote server Node1 failed with the following error
message : WinRM cannot complete the operation. Verify that the specified computer
name is valid, that the computer is accessible over the network, and that a firewall
exception for the WinRM service is enabled and allows access from this computer. By
default, the WinRM firewall exception for public profiles limits access to remote computers
within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (Node1:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : WinRMOperationTimeout,PSSessionStateBroken
答案 0 :(得分:7)
尝试以下解决方法来解决WINRM问题。
连接到远程服务器并以管理员身份从cmd运行以下命令。
jQuery(function($){
var price = <?php echo $product->get_price(); ?>,
currency = '<?php echo get_woocommerce_currency_symbol(); ?>';
$('[name=quantity]').change(function(){
if (this.value >= 10) {
var newPrice = price * 1.2;
var product_total = parseFloat(newPrice * this.value);
$('#product_total_price .price').html( currency + product_total.toFixed(2));
} else if (this.value >= 1) {
var product_total = parseFloat(price * this.value);
$('#product_total_price .price').html( currency + product_total.toFixed(2));
} else {
// do nothing
}
});
});
答案 1 :(得分:5)
是否在两台计算机上启用了WinRM ???
运行
winrm quickconfig
并检查它。
答案 2 :(得分:4)