I am trying to import Don Jones’ “EnhancedHTML2” module. I downloaded the files from GitHub and copied them to my Modules folder (my server doesn’t have access to external sites). When I try to import the module, I receive an error about the module manifest. Error is below. I am in “FullLanguage” mode (not constrained/restricted). I have seen sites when researching this error, but have found no solution yet. Any ideas?
Error:
Test-ModuleManifest : The module manifest
‘C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1’ could not be processed because
it is not a valid Windows PowerShell restricted language file. Remove the elements that are not permitted by the
restricted language:
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:1 char:1
- $script = ‘’
-
Assignment statements are not allowed in restricted language mode or a Data section.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:1 char:1
- $script = ‘’
-
A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that
can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, $null, $PSScriptRoot, $PSEdition.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:2 char:1
- function ConvertTo-EnhancedHTML {
-
Function declarations are not allowed in restricted language mode or a Data section.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:2 char:33
- function ConvertTo-EnhancedHTML {
- ~
Script block literals are not allowed in restricted language mode or a Data section.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:61 char:5 - param(
-
Parameter declarations are not allowed in restricted language mode or a Data section.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:60 char:5
- [CmdletBinding()]
-
Attributes are not allowed in restricted language mode or a Data section.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:62 char:17
- [string]$jQueryURI = 'http://ajax.aspnetcdn.com/ajax/jQuery/j …
-
A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that
can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, $null, $PSScriptRoot, $PSEdition.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:63 char:17
- [string]$jQueryDataTableURI = 'http://ajax.aspnetcdn.com/ajax …
-
A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that
can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, $null, $PSScriptRoot, $PSEdition.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:64 char:9
- [Parameter(ParameterSetName=‘CSSContent’)][string]$CssStyle …
-
Attributes are not allowed in restricted language mode or a Data section.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\EnhancedHTML2\EnhancedHTML2.psd1:64 char:61
- … [Parameter(ParameterSetName=‘CSSContent’)][string]$CssStyleSheet,
-
A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that
can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, $null, $PSScriptRoot, $PSEdition.
Not all parse errors were reported. Correct the reported errors and try again.
At line:1 char:1
- Test-ModuleManifest C:\Windows\system32\WindowsPowerShell\v1.0\Module …
-
- CategoryInfo : ResourceUnavailable: (C:\Windows\syst…ancedHTML2.psd1:String) [Test-ModuleManifest], M
issingMemberException - FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.TestModuleManifestCommand