Vishnu Imp
Vishnu Imp

Reputation: 5

Bypass a PowerShell cmdlet's confirmation prompt

I am trying to disconnect from a iscsi target from PowerShell using below cmdlet.

Disconnect-IscsiTarget -NodeAddress $Target.NodeAddress

But once i execute that, a confirmation prompt is displayed:

Do you want to perform this Action [yes,yestoall,no,notoall,suspend]

How can i make default to Yes?

Upvotes: 0

Views: 5312

Answers (1)

Vincent K
Vincent K

Reputation: 1346

Disconnect-IscsiTarget -NodeAddress $Target.NodeAddress -Confirm:$false

Upvotes: 1

Related Questions