This is usually one of two things:
1. You didn't unblock Carbon after downloading it.
2. You are trying to load Carbon across a network share.
The solutions are:
1. Re-download Carbon, unblock it, unzip it, then try again.
2. Load Carbon from a local path.
Hi.
I get this error when running the import ps1 file
Import-Module : Could not load file or assembly 'file:///C:\Carbon\Carbon\b=
in\Carbon.dll' or one of its dependencies. Operation is not supported. (Exc=
eption from HRESULT: 0x80131515) At C:\Carbon\Carbon\import-carbon.ps1:96 char:1
+ Import-Module $carbonPsd1Path -ErrorAction Stop -Verbose:$false @impo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], FileLo=
adException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell=
.Commands.ImportModuleCommand
Get-Member : You must specify an object for the Get-Member cmdlet.
At C:\Carbon\Carbon\import-carbon.ps1:98 char:39
+ ... f( -not (Get-Module -Name 'Carbon' | Get-Member -Name 'ImportedAt') )
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-Member], InvalidOperatio=
nException
+ FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Comm=
ands.GetMemberCommand
The property 'ImportedAt' cannot be found on this object. Verify that the p=
roperty exists and can be set.
At C:\Carbon\Carbon\import-carbon.ps1:106 char:5
+ $loadedModule.ImportedAt =3D Get-Date
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
It's on a windows 2016 server but I get the same on a windows 2012R2 server= .
I'm not installing it in the PowerShell dirs. As it need to be used as a pa=
ckage to remotely deploy an application (so it's a file copy) and its dele=
ted afterwards.
I can access the DLL directly but I need access to the service security fun=
ctions, and I don't see how to do this directly in the dll (easily)
Regards
Mark