Skip to content

Commit 521b108

Browse files
committed
Adds -Force switch for Disconnect-CSObject cmdlet
1 parent 5102ae3 commit 521b108

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Lithnet.Miiserver.Automation/Disconnect-CSObject.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
namespace Lithnet.Miiserver.Automation
1010
{
1111
[Cmdlet(VerbsCommunications.Disconnect, "CSObject")]
12-
public class DisconnectCSObject : Cmdlet
12+
public class DisconnectCSObject : PSCmdlet
1313
{
1414
[Parameter(Mandatory = true, Position = 1, ValueFromPipeline =true), ValidateNotNullOrEmpty]
1515
public CSObject CSObject { get; set; }
1616

1717
[Parameter(Mandatory = false, Position = 2)]
1818
public SwitchParameter Explicit {get;set;}
1919

20+
[Parameter(Mandatory = false, Position = 3)]
21+
public SwitchParameter Force { get; set; }
22+
2023
private bool yesToAll;
2124

2225
private bool noToAll;
@@ -32,7 +35,7 @@ protected override void ProcessRecord()
3235
return;
3336
}
3437

35-
if (this.yesToAll || this.ShouldContinue("This action will result in the metaverse object being deleted. Continue", "Confirm disconnection", ref this.yesToAll, ref this.noToAll))
38+
if (this.Force || this.yesToAll || this.ShouldContinue("This action will result in the metaverse object being deleted. Continue", "Confirm disconnection", ref this.yesToAll, ref this.noToAll))
3639
{
3740
this.prompted = true;
3841
this.CSObject.Disconnect(this.Explicit.IsPresent);

src/Lithnet.Miiserver.Automation/LithnetMIISAutomation.Help.pshproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<ModuleObject xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fVersion="1.1" type="Manifest" mclass="Module" useSupports="false">
33
<Name>LithnetMIISAutomation</Name>
4-
<Version>1.0.6236.18578</Version>
4+
<Version>1.0.6320.366</Version>
55
<Description>Lithnet PowerShell Module for FIM Synchronization Service</Description>
66
<HasManifest>true</HasManifest>
77
<Provider>

0 commit comments

Comments
 (0)