You were right. I just installed 3.
Name | Value |
---- | ----- |
WSManStackVersion | 3.0 |
PSCompatibleVersions | {1.0, 2.0, 3.0} |
SerializationVersion | 1.1.0.1 |
BuildVersion | 6.2.9200.16398 |
PSVersion | 3.0 |
CLRVersion | 4.0.30319.1 |
PSRemotingProtocolVersion | 2.2 |
Now I got the following errors: Exception calling "Add" with "1" argument(s): "Value cannot be null. Parameter name: item" At C:\scripts\VMware\DatastoreCheck.ps1:74 char:1 + $msg.Attachments.Add($att1) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentNullException You cannot call a method on a null-valued expression. At C:\scripts\VMware\DatastoreCheck.ps1:78 char:1 + $smtp.Send($msg) + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull