2, The following error is generated by a script (it just removes a number of lines above a certain length); and was working fine on PS5.1:
Could not load type ‘Microsoft.VisualBasic.Devices.Computer’ from assembly ‘Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
And what’s the question? If you cannot use PS version 7 because compatibility problems you should keep using version 5.1. It will be available for a looooong time. So no need to migrate old scripts.
Did you move the script to a newer version of Windows? Here is an excerpt from the Help of Write-EventLog:
“The cmdlets that contain the EventLog noun (the EventLog cmdlets) work only on classic event logs. To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of the Windows operating system, use the Get-WinEvent cmdlet.”
No question, just stating a fact. The script was working fine on PS5.1 on Windows 10 in the standard InternetExplorer Event Log. Installing PS7 in parallel generates the above errors.