Unable to run a powershell to create a failover cluster using chef


#1

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running the
following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy
Unrestricted, -InputFormat None’
end

the 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


#2

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 <pradeep.goldfields@gmail.com

wrote:

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running the
following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy
Unrestricted, -InputFormat None’
end

the 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
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


#3

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).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com [http://stevenmurawski.com/]
On 4/27/2015 9:13:22 AM, Kenneth Barry kbarry@tunein.com 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 <pradeep.goldfields@gmail.com [mailto:pradeep.goldfields@gmail.com]> wrote:

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running the following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy Unrestricted, -InputFormat None’
end

the 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
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com [http://www.tunein.com/]


#4

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 steven.murawski@gmail.com
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).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On 4/27/2015 9:13:22 AM, Kenneth Barry kbarry@tunein.com 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 <
pradeep.goldfields@gmail.com> wrote:

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running the
following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy
Unrestricted, -InputFormat None’
end

the 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
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


pradeep


#5

Hey Pradeep,

You still haven’t mentioned how chef-client is running… are you running it manually from the command line? Is it running as a service? Is it running in task scheduler? In the case of the latter two, what account is it running as?

If it is not AD permission related, how long did it take for new-cluster to return when you ran it manually? (if you need a timer, there is measure-command) I’d check if that time exceeds the timeout for the PowerShell script resource.

Have you considered pre-staging the AD object for the cluster account? That can speed up the process.

Do you have multiple AD sites? I’ve noticed that cluster creation can talk to different domain controllers for different parts of the cluster creation operation. This can add latency or worse (depending on how quickly objects can replicate between domains).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com [http://stevenmurawski.com/]
On 4/28/2015 1:31:17 AM, Pradeep Kumar pradeep.goldfields@gmail.com 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 <steven.murawski@gmail.com [mailto:steven.murawski@gmail.com]> 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).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com [http://stevenmurawski.com/]
On 4/27/2015 9:13:22 AM, Kenneth Barry <kbarry@tunein.com [mailto:kbarry@tunein.com]> 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 <pradeep.goldfields@gmail.com [mailto:pradeep.goldfields@gmail.com]> wrote:

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running the following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy Unrestricted, -InputFormat None’
end

the 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
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com [http://www.tunein.com/]

pradeep


#6

Also, unless someone else mentioned it, and if you are not currently doing
it: Log directly into the box and run chef on the box. Sometimes the output
will be a little more verbose. You might also put on --debug to get more
output, you might try to output the results of the posh command to a file
(pseudo logging)

They can be tricky to get going at times.

On Tue, Apr 28, 2015 at 7:19 AM, Steven Murawski steven.murawski@gmail.com
wrote:

Hey Pradeep,

You still haven’t mentioned how chef-client is running… are you running
it manually from the command line? Is it running as a service? Is it
running in task scheduler? In the case of the latter two, what account is
it running as?

If it is not AD permission related, how long did it take for new-cluster
to return when you ran it manually? (if you need a timer, there is
measure-command) I’d check if that time exceeds the timeout for the
PowerShell script resource.

Have you considered pre-staging the AD object for the cluster account?
That can speed up the process.

Do you have multiple AD sites? I’ve noticed that cluster creation can
talk to different domain controllers for different parts of the cluster
creation operation. This can add latency or worse (depending on how
quickly objects can replicate between domains).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On 4/28/2015 1:31:17 AM, Pradeep Kumar pradeep.goldfields@gmail.com
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 <
steven.murawski@gmail.com> 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).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On 4/27/2015 9:13:22 AM, Kenneth Barry kbarry@tunein.com 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 <
pradeep.goldfields@gmail.com> wrote:

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running
the following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy
Unrestricted, -InputFormat None’
end

the 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
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


pradeep

Kenneth Barry
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


#7

Hey Guys,

Thank you for the ideas.

My chef is triggered by a cloud called monsoon. I think the issue is that
the cloud is invoking chef run as a local user account or a different user
that do not has AD related rights. let me check on this and get back.

will update on either case (Success & Failure).

On Tue, Apr 28, 2015 at 9:11 PM, Kenneth Barry kbarry@tunein.com wrote:

Also, unless someone else mentioned it, and if you are not currently doing
it: Log directly into the box and run chef on the box. Sometimes the output
will be a little more verbose. You might also put on --debug to get more
output, you might try to output the results of the posh command to a file
(pseudo logging)

They can be tricky to get going at times.

On Tue, Apr 28, 2015 at 7:19 AM, Steven Murawski <
steven.murawski@gmail.com> wrote:

Hey Pradeep,

You still haven’t mentioned how chef-client is running… are you running
it manually from the command line? Is it running as a service? Is it
running in task scheduler? In the case of the latter two, what account is
it running as?

If it is not AD permission related, how long did it take for new-cluster
to return when you ran it manually? (if you need a timer, there is
measure-command) I’d check if that time exceeds the timeout for the
PowerShell script resource.

Have you considered pre-staging the AD object for the cluster account?
That can speed up the process.

Do you have multiple AD sites? I’ve noticed that cluster creation can
talk to different domain controllers for different parts of the cluster
creation operation. This can add latency or worse (depending on how
quickly objects can replicate between domains).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On 4/28/2015 1:31:17 AM, Pradeep Kumar pradeep.goldfields@gmail.com
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 <
steven.murawski@gmail.com> 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).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On 4/27/2015 9:13:22 AM, Kenneth Barry kbarry@tunein.com 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 <
pradeep.goldfields@gmail.com> wrote:

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running
the following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy
Unrestricted, -InputFormat None’
end

the 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
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


pradeep

Kenneth Barry
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


pradeep


#8

Yup, may be useful to see “whom” is running the stuff.

On Wed, Apr 29, 2015 at 1:59 AM, Pradeep Kumar <pradeep.goldfields@gmail.com

wrote:

Hey Guys,

Thank you for the ideas.

My chef is triggered by a cloud called monsoon. I think the issue is that
the cloud is invoking chef run as a local user account or a different user
that do not has AD related rights. let me check on this and get back.

will update on either case (Success & Failure).

On Tue, Apr 28, 2015 at 9:11 PM, Kenneth Barry kbarry@tunein.com wrote:

Also, unless someone else mentioned it, and if you are not currently
doing it: Log directly into the box and run chef on the box. Sometimes the
output will be a little more verbose. You might also put on --debug to get
more output, you might try to output the results of the posh command to a
file (pseudo logging)

They can be tricky to get going at times.

On Tue, Apr 28, 2015 at 7:19 AM, Steven Murawski <
steven.murawski@gmail.com> wrote:

Hey Pradeep,

You still haven’t mentioned how chef-client is running… are you running
it manually from the command line? Is it running as a service? Is it
running in task scheduler? In the case of the latter two, what account is
it running as?

If it is not AD permission related, how long did it take for new-cluster
to return when you ran it manually? (if you need a timer, there is
measure-command) I’d check if that time exceeds the timeout for the
PowerShell script resource.

Have you considered pre-staging the AD object for the cluster account?
That can speed up the process.

Do you have multiple AD sites? I’ve noticed that cluster creation can
talk to different domain controllers for different parts of the cluster
creation operation. This can add latency or worse (depending on how
quickly objects can replicate between domains).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On 4/28/2015 1:31:17 AM, Pradeep Kumar pradeep.goldfields@gmail.com
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 <
steven.murawski@gmail.com> 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).

Steve

Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On 4/27/2015 9:13:22 AM, Kenneth Barry kbarry@tunein.com 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 <
pradeep.goldfields@gmail.com> wrote:

Hi Every one,

hope someone could help me on this.

im trying to create a failover windows cluster using chef. im running
the following

powershell_script “Validate and Create cluster” do
code <<-EOH
import-module failoverclusters
New-Cluster –Name TestCluster –Node node1,node2 –StaticAddress "IP"
EOH
flags '-NoLogo, -NonInteractive, -NoProfile, -ExecutionPolicy
Unrestricted, -InputFormat None’
end

the 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
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


pradeep

Kenneth Barry
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com


pradeep

Kenneth Barry
TuneIn | Build and Release Engineer
M: 409-673-0544
www.tunein.com