This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
entralus], id: [40] Refresh failed | |
[----] E, [2016-03-01T13:27:55.830244 #75136:3ff9848221f8] ERROR -- : [Azure::Armrest::ResourceNotFoundException]: The resource type 'virtualMachines' could not be found in the namespace 'Microsoft.Compute' for api version '2016-03-30'. The supported api-versions are '2015-05-01-preview,2015-06-15'. Method:[rescue in block in refresh] | |
[----] E, [2016-03-01T13:27:55.830464 #75136:3ff9848221f8] ERROR -- : /Users/bronaghsorota/.gem/ruby/2.2.3/gems/azure-armrest-0.1.1/lib/azure/armrest/armrest_service.rb:369:in `raise_api_exception' | |
/Users/bronaghsorota/.gem/ruby/2.2.3/gems/azure-armrest-0.1.1/lib/azure/armrest/armrest_service.rb:317:in `rescue in rest_execute' | |
/Users/bronaghsorota/.gem/ruby/2.2.3/gems/azure-armrest-0.1.1/lib/azure/armrest/armrest_service.rb:315:in `rest_execute' | |
/Users/bronaghsorota/.gem/ruby/2.2.3/gems/azure-armrest-0.1.1/lib/azure/armrest/armrest_service.rb:390:in `rest_execute' | |
/Users/bronaghsorota/.gem/ruby/2.2.3/gems/azure-armrest-0.1.1/lib/azure/armrest/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apimgmt_url_sub = 'https://miqazure.management.azure-api.net/subscriptions?api-version=2014-02-14-preview' | |
apimgmt_url_users = 'https://miqazure.management.azure-api.net/users?api-version=2014-02-14-preview' | |
auth = 'SharedAccessSignature uid=5547d3db51e5d403c3030003&ex=2015-05-22T14:29:00.0000000Z&sn=l8fLHyathwvfBcWwg7L3wBbl3knCbNgCTM/umLmGRKiBk6GhIa3GoJ01ZEZc781095iusUEEuTKdrbheZisbGQ==' | |
subs = RestClient.get apimgmt_url_sub, {:Authorization => auth} | |
users = RestClient.get apimgmt_url_users, {:Authorization => auth} | |
puts subs | |
puts users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rest-client' | |
url = 'https://miqazure.management.azure-api.net/subscriptions/9705df19-911f-4871-b467-26e248002411/resourceGroups/MIQAZ2/providers/Microsoft.Compute/VirtualMachines/MIQAZ2?api-version=2015-05-01-preview' | |
auth = 'SharedAccessSignature uid=5547d3db51e5d403c3030003&ex=2015-05-22T14:29:00.0000000Z&sn=l8fLHyathwvfBcWwg7L3wBbl3knCbNgCTM/umLmGRKiBk6GhIa3GoJ01ZEZc781095iusUEEuTKdrbheZisbGQ==' | |
r = RestClient.get url, {:Authorization => auth} | |
puts r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openssl' | |
require 'nokogiri' | |
require 'azure' | |
require 'base64' | |
# Modify as needed | |
dir = "/Users/bronaghsorota/" | |
pub = File.join(dir, "azure.publishsettings") | |
# Extract the data we need from the XML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'winrm' | |
PS_SCRIPT = <<-PS_SCRIPT | |
$result = @{ | |
"date" = Get-Date; | |
"services" = Get-Service | |
} | |
$result | ConvertTo-JSON | |
PS_SCRIPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement") | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.Configuration") | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.ConnectorFramework") | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.Monitoring") | |
$mg = Get-SCOMManagementGroup -ComputerName "SCOMGR.manageiq.com" | |
$framework = $mg.ConnectorFramework | |
$connectorinfo = New-Object Microsoft.EnterpriseManagement.ConnectorFramework.ConnectorInfo | |
$connectorinfo.Description = "CF SCOM Connector" |