noahlh / aws-automated-backup-powershell

A set of Windows PowerShell scripts to enable automated backups (via snapshots) on AWS EC2 Windows instances
Other
39 stars 27 forks source link

Errors on Script #15

Closed dms2015 closed 9 years ago

dms2015 commented 9 years ago

I am receiving the below errors on the script. I also loaded the aws sdk (installed) but the original AWSSDK.dll doesn't exist in that folder so I modified it to EC2 for my AWS SDK Path. Can I change it to this dll?

AWS SDK Path

Add-Type -Path "C:\Program Files (x86)\AWS SDK for .NET\bin\Net45\AWSSDK.EC2.dll"

This is the Error I am receiving after I errored out on the above: Unable to find type [Amazon.AWSClientFactory]: make sure that the assembly containing this type is loaded. At C:\AWS\AWSConfig.ps1:42 char:1

    + CategoryInfo          : InvalidOperation: (Amazon.AWSClientFactory:TypeN 
   ame) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

New-Object : Cannot find type 
[Amazon.SimpleEmail.AmazonSimpleEmailServiceConfig]: make sure the assembly 
containing this type is loaded.
At C:\AWS\AWSConfig.ps1:45 char:13
+ $ses_config=New-Object Amazon.SimpleEmail.AmazonSimpleEmailServiceConfig
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentExcepti 
   on
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewOb 
   jectCommand

Property 'ServiceURL' cannot be found on this object; make sure it exists and 
is settable.
At C:\AWS\AWSConfig.ps1:46 char:1
+ $ses_config.ServiceURL = $sesURL
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

Unable to find type [Amazon.AWSClientFactory]: make sure that the assembly 
containing this type is loaded.
At C:\AWS\AWSConfig.ps1:47 char:1
+ $SES_CLIENT=[Amazon.AWSClientFactory]::CreateAmazonSimpleEmailServiceClient($
acc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (Amazon.AWSClientFactory:TypeN 

ame) [], RuntimeException

matteobraga commented 9 years ago

I receive this error

27/08/2015 09.15.16 WriteToLog : System.NotSupportedException: Specified method is not supported. at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)

I check snapshot and i find it but i think this error block only sending mail script

amanakash commented 9 years ago

@dms2015 you can find some help in this closed issue.

https://github.com/noahlh/aws-automated-backup-powershell/issues/14#issuecomment-131584777

necarlson commented 9 years ago

I fixed this while implementing support for a custom email server, although forgot to mention it in my commit comment. See pull request #19.