本文整理汇总了C#中WindowsAzurePowershellCmdlet类的典型用法代码示例。如果您正苦于以下问题:C# WindowsAzurePowershellCmdlet类的具体用法?C# WindowsAzurePowershellCmdlet怎么用?C# WindowsAzurePowershellCmdlet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WindowsAzurePowershellCmdlet类属于命名空间,在下文中一共展示了WindowsAzurePowershellCmdlet类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddAzureDisk
// Add-AzureDisk
public DiskContext AddAzureDisk(string diskName, string mediaPath, string label, string os)
{
AddAzureDiskCmdletInfo addAzureDiskCmdletInfo = new AddAzureDiskCmdletInfo(diskName, mediaPath, label, os);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(addAzureDiskCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (DiskContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:13,代码来源:ServiceManagementCmdletTestHelper.cs
示例2: AddAzureCertificate
public ManagementOperationContext AddAzureCertificate(string serviceName, PSObject cert, string password)
{
AddAzureCertificateCmdletInfo addAzureCertificateCmdletInfo = new AddAzureCertificateCmdletInfo(serviceName, cert, password);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(addAzureCertificateCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例3: AddAzureDataDisk
public PersistentVM AddAzureDataDisk(AddAzureDataDiskConfig diskConfig)
{
AddAzureDataDiskCmdletInfo addAzureDataDiskCmdletInfo = new AddAzureDataDiskCmdletInfo(diskConfig);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(addAzureDataDiskCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (PersistentVM)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例4: RemoveAzureCertificate
public ManagementOperationContext RemoveAzureCertificate(string serviceName, string thumbprint, string algorithm)
{
RemoveAzureCertificateCmdletInfo removeAzureCertificateCmdletInfo = new RemoveAzureCertificateCmdletInfo(serviceName, thumbprint, algorithm);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(removeAzureCertificateCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例5: RemoveAzureAffinityGroup
public ManagementOperationContext RemoveAzureAffinityGroup(string name)
{
RemoveAzureAffinityGroupCmdletInfo removeAzureAffinityGroupCmdletInfo = new RemoveAzureAffinityGroupCmdletInfo(name);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(removeAzureAffinityGroupCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例6: GetAzureVM
public PersistentVMRoleContext GetAzureVM(string vmName, string serviceName)
{
GetAzureVMCmdletInfo getAzureVMCmdletInfo = new GetAzureVMCmdletInfo(vmName, serviceName);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureVMCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (PersistentVMRoleContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例7: SaveAzureVhdStop
public string SaveAzureVhdStop(Uri source, FileInfo localFilePath, int? numThreads, string storageKey, bool overwrite, int ms)
{
SaveAzureVhdCmdletInfo saveAzureVhdCmdletInfo = new SaveAzureVhdCmdletInfo(source, localFilePath, numThreads, storageKey, overwrite);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(saveAzureVhdCmdletInfo);
return azurePowershellCmdlet.RunAndStop(ms).ToString();
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:6,代码来源:ServiceManagementCmdletTestHelper.cs
示例8: RestartAzureVM
public void RestartAzureVM(string vmName, string serviceName)
{
RestartAzureVMCmdletInfo restartAzureVMCmdlet = new RestartAzureVMCmdletInfo(vmName, serviceName);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(restartAzureVMCmdlet);
azurePowershellCmdlet.Run();
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:6,代码来源:ServiceManagementCmdletTestHelper.cs
示例9: RemoveAzureVNetConfig
public ManagementOperationContext RemoveAzureVNetConfig()
{
RemoveAzureVNetConfigCmdletInfo removeAzureVNetConfigCmdletInfo = new RemoveAzureVNetConfigCmdletInfo();
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(removeAzureVNetConfigCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例10: GetAzureVNetGatewayKey
public SharedKeyContext GetAzureVNetGatewayKey(string vnetName, string localnet)
{
GetAzureVNetGatewayKeyCmdletInfo getAzureVNetGatewayKeyCmdletInfo = new GetAzureVNetGatewayKeyCmdletInfo(vnetName, localnet);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureVNetGatewayKeyCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (SharedKeyContext) result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例11: RemoveAzureEndPoint
public PersistentVMRoleContext RemoveAzureEndPoint(string epName, PersistentVMRoleContext vmRoleCtxt)
{
RemoveAzureEndpointCmdletInfo removeAzureEndPointCmdletInfo = new RemoveAzureEndpointCmdletInfo(epName, vmRoleCtxt);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(removeAzureEndPointCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (PersistentVMRoleContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例12: NewAzureDns
public DnsServer NewAzureDns(string name, string ipAddress)
{
NewAzureDnsCmdletInfo newAzureDnsCmdletInfo = new NewAzureDnsCmdletInfo(name, ipAddress);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(newAzureDnsCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (DnsServer)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例13: NewAzureDeployment
public ManagementOperationContext NewAzureDeployment(string serviceName, string packagePath, string configPath, string slot, string label, string name, bool doNotStart, bool warning)
{
NewAzureDeploymentCmdletInfo newAzureDeploymentCmdletInfo = new NewAzureDeploymentCmdletInfo(serviceName, packagePath, configPath, slot, label, name, doNotStart, warning);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(newAzureDeploymentCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例14: NewAzureCertificateSetting
public CertificateSetting NewAzureCertificateSetting(string thumbprint, string store)
{
NewAzureCertificateSettingCmdletInfo newAzureCertificateSettingCmdletInfo = new NewAzureCertificateSettingCmdletInfo(thumbprint, store);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(newAzureCertificateSettingCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (CertificateSetting)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:14,代码来源:ServiceManagementCmdletTestHelper.cs
示例15: ImportAzureVM
public Collection<PersistentVM> ImportAzureVM(string path)
{
Collection<PersistentVM> result = new Collection<PersistentVM>();
ImportAzureVMCmdletInfo importAzureVMCmdletInfo = new ImportAzureVMCmdletInfo(path);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(importAzureVMCmdletInfo);
foreach (var vm in azurePowershellCmdlet.Run())
{
result.Add((PersistentVM)vm.BaseObject);
}
return result;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例16: GetAzureVNetSite
public Collection<VirtualNetworkSiteContext> GetAzureVNetSite(string vnetName)
{
GetAzureVNetSiteCmdletInfo getAzureVNetSiteCmdletInfo = new GetAzureVNetSiteCmdletInfo(vnetName);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureVNetSiteCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
Collection<VirtualNetworkSiteContext> connections = new Collection<VirtualNetworkSiteContext>();
foreach (PSObject re in result)
{
connections.Add((VirtualNetworkSiteContext)re.BaseObject);
}
return connections;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:13,代码来源:ServiceManagementCmdletTestHelper.cs
示例17: RemoveAzureDeployment
public ManagementOperationContext RemoveAzureDeployment(string serviceName, string slot, bool force)
{
RemoveAzureDeploymentCmdletInfo removeAzureDeploymentCmdletInfo = new RemoveAzureDeploymentCmdletInfo(serviceName, slot, force);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(removeAzureDeploymentCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:12,代码来源:ServiceManagementCmdletTestHelper.cs
示例18: RemoveAzureStorageAccount
public void RemoveAzureStorageAccount(string storageAccountName)
{
var removeAzureStorageAccountCmdletInfo = new RemoveAzureStorageAccountCmdletInfo(storageAccountName);
var azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(removeAzureStorageAccountCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:6,代码来源:ServiceManagementCmdletTestHelper.cs
示例19: RemoveAzureDisk
// Remove-AzureDisk
public ManagementOperationContext RemoveAzureDisk(string diskName, bool deleteVhd)
{
RemoveAzureDiskCmdletInfo removeAzureDiskCmdletInfo = new RemoveAzureDiskCmdletInfo(diskName, deleteVhd);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(removeAzureDiskCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
if (result.Count == 1)
{
return (ManagementOperationContext)result[0].BaseObject;
}
return null;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:13,代码来源:ServiceManagementCmdletTestHelper.cs
示例20: GetAzureVNetGateway
public Collection<VirtualNetworkGatewayContext> GetAzureVNetGateway(string vnetName)
{
GetAzureVNetGatewayCmdletInfo getAzureVNetGatewayCmdletInfo = new GetAzureVNetGatewayCmdletInfo(vnetName);
WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureVNetGatewayCmdletInfo);
Collection<PSObject> result = azurePowershellCmdlet.Run();
Collection<VirtualNetworkGatewayContext> vnetGateways = new Collection<VirtualNetworkGatewayContext>();
foreach (PSObject re in result)
{
vnetGateways.Add ((VirtualNetworkGatewayContext) re.BaseObject);
}
return vnetGateways;
}
开发者ID:huangpf,项目名称:azure-sdk-tools,代码行数:13,代码来源:ServiceManagementCmdletTestHelper.cs
注:本文中的WindowsAzurePowershellCmdlet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论