public override void Execute()
{
base.Execute();
WriteWarning("The output object type of this cmdlet will be modified in a future release.");
var present = this.IsNetworkInterfacePresent(this.ResourceGroupName, this.Name);
ConfirmAction(
Force.IsPresent,
string.Format(Properties.Resources.OverwritingResource, Name),
Properties.Resources.CreatingResourceMessage,
Name,
() =>
{
var networkInterface = CreateNetworkInterface();
if (present)
{
networkInterface = this.GetNetworkInterface(this.ResourceGroupName, this.Name);
}
WriteObject(networkInterface);
},
() => present);
}