On 4/28/2015 1:31:17 AM, Pradeep Kumar < > wrote:
Thank you! Steven and Kenneth,I have admin access to AD and DNS servers.i'm able to run the same script locally and create a Failover Cluster and connect to it.when i run it from Chef, the script above and below the "New-Cluster" runs perfectly fine.only the "New-Cluster" command does not seem to run.i think chef run ends before the command is complete and kills the command.any ideas to avoid this? or any other debugging which can be done?Please do pour in your ideas as i'm running out of ideas for this issue.On Mon, Apr 27, 2015 at 8:52 PM, Steven Murawski < " target="_blank"> > wrote:Pradeep,Another challenge with the clustering commands is that permissions to create AD objects is required. When you create a new cluster, the command tries to create a new computer object in active directory for that cluster name. If the account exists and is disabled, the command will try to activate it. If the account exists and is active, the command will fail.Things to check - does the account that is running the chef-client have rights to create objects in AD? Does the clustername already exist as a computer object in AD? If it already exists, is it disabled?A note on the flags.. pretty much everything you specified are the defaults (other than execution policy) and for the command you've specified the default of RemoteSigned should be fine. You can probably drop that attribute (to minimize your testing surface).SteveSteven MurawskiCommunity Software Development Engineer @ ChefMicrosoft MVP - PowerShell
http://stevenmurawski.comOn 4/27/2015 9:13:22 AM, Kenneth Barry < " target="_blank"> > wrote:
This may be a case of scope.Someone else can get more technical, but my experience has been that when a powershell script is part of a chef recipe, it doesn't always go that if it does not go as intended, that chef will know.To some degree, Chef only knows to run the script, not what the script will do. So, its like handing a note to a man at a door with instruction to ..... Yell for [someone] to come to the door. "Chef" takes the note, Yells into the other room for [someone] to come to the door, then turns back to you and says "OK, I did it", irregardless of someone coming to the door or not, irregardless of there even being anyone in the room or not, "You asked it to yell for someone to come to the door", and it did that.You may want to put some debugging in place, or look into some of the features for powershell logging. I suspect you may have a syntax problem "needing to escape a character, so its being passed in incorrectly, etc.), but your not seeing the error.On Mon, Apr 27, 2015 at 5:49 AM, Pradeep Kumar < " target="_blank"> > wrote:Hi Every one,hope someone could help me on this.im trying to create a failover windows cluster using chef. im running the followingpowershell_script "Validate and Create cluster" docode <<-EOHimport-module failoverclustersNew-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"EOHflags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy Unrestricted, -InputFormat None'endthe new-cluster command does not seem to run.my chef run ends with a success! with no errors.i have previously run various powershell scripts through chef and have been successfull. but no luck with this one.--pradeep--Kenneth Barry
--pradeep
Archive powered by MHonArc 2.6.16.