Skip to content

Commit 189e166

Browse files
committed
Fix bug related to the return value for passthru parameter
1 parent 0fbe671 commit 189e166

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

src/ResourceManager/Intune/Commands.Intune/Apps/AddIntuneAndroidMAMPolicyAppCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public override void ExecuteCmdlet()
5353

5454
if (PassThru)
5555
{
56-
this.WriteObject(result.Response.StatusCode == HttpStatusCode.OK ? true : false);
56+
this.WriteObject(result.Response.StatusCode == HttpStatusCode.NoContent ? true : false);
5757
}
5858
}
5959
}

src/ResourceManager/Intune/Commands.Intune/Apps/AddIntuneiOSMAMPolicyAppCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public override void ExecuteCmdlet()
5353
var result = this.IntuneClient.Ios.AddAppForMAMPolicyWithHttpMessagesAsync(this.AsuHostName, this.Name, this.AppName, payLoad).GetAwaiter().GetResult();
5454
if (PassThru)
5555
{
56-
this.WriteObject(result.Response.StatusCode == HttpStatusCode.OK ? true : false);
56+
this.WriteObject(result.Response.StatusCode == HttpStatusCode.NoContent ? true : false);
5757
}
5858
}
5959
}

src/ResourceManager/Intune/Commands.Intune/Apps/RemoveIntuneiOSMAMPolicyAppCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public sealed class RemoveIntuneiOSMAMPolicyAppCmdlet : IntuneBaseCmdlet
4545

4646
[Parameter(Mandatory = false, HelpMessage = "If specified will write true in case operation succeeds. This parameter is optional. Default value is false.")]
4747
public SwitchParameter PassThru { get; set; }
48+
4849
/// <summary>
4950
/// Executes the cmdlet.
5051
/// </summary>

src/ResourceManager/Intune/Commands.Intune/Groups/AddIntuneAndroidMAMPolicyGroupCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public override void ExecuteCmdlet()
5353
var result = this.IntuneClient.Android.AddGroupForMAMPolicyWithHttpMessagesAsync(this.AsuHostName, this.Name, this.GroupName, payLoad).GetAwaiter().GetResult();
5454
if (PassThru)
5555
{
56-
this.WriteObject(result.Response.StatusCode == HttpStatusCode.OK ? true : false);
56+
this.WriteObject(result.Response.StatusCode == HttpStatusCode.NoContent ? true : false);
5757
}
5858
}
5959
}

src/ResourceManager/Intune/Commands.Intune/Groups/AddIntuneiOSMAMPolicyGroupCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public override void ExecuteCmdlet()
5353
var result = this.IntuneClient.Ios.AddGroupForMAMPolicyWithHttpMessagesAsync(this.AsuHostName, this.Name, this.GroupName, payLoad).GetAwaiter().GetResult();
5454
if (PassThru)
5555
{
56-
this.WriteObject(result.Response.StatusCode == HttpStatusCode.OK ? true : false);
56+
this.WriteObject(result.Response.StatusCode == HttpStatusCode.NoContent ? true : false);
5757
}
5858
}
5959
}

0 commit comments

Comments
 (0)