An error occurred while reading the restart journal - powershell

When attempting to run the Azure Storage SDK tool AzCopy.exe (v5.1.1) from Powershell using the command syntax:
.\AzCopy /source:https://mystorageacct1.blob.core.windows.net/mycontainer/ /dest:https://mystorageacct2.blob.core.windows.net/mycontainer/ /sourcekey:[sourcekey] /destkey:[destkey] /S
I received the error:
.\AzCopy.exe : [2017/10/04 12:59:12][ERROR] An error occurred while reading the restart journal from "C:\Users\admin\AppData\Local\Microsoft\Azure\AzCopy". Detailed error: Error parsing the journal file: Journal file was generated by a different version
of AzCopy.
At line:1 char:1
+ .\AzCopy.exe /source:"https://mystorageacct1.blob.core.windows.net/source" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ([2017/10/04 12:...sion of AzCopy.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

Resolved when deleting the contents (specifically the journal file) from:
C:\Users\admin\AppData\Local\Microsoft\Azure\AzCopy
Then executing the Powershell script again.

Related

CLI Reset Local Cluster (Rebuild Clusters according to Manifest)

I'm trying to figure out the command to rebuild clusters according to the manifest, ie. the equivalent to the tray icon menu entry: Reset Local Cluster.
I run the command I've found as a user who is a member of the Local Administrators, but I get some No Access (Ingen tilgang)
PS C:\Users\caec> C:\"Program Files"\"Microsoft SDKs"\"Service Fabric"\ClusterSetup\DevClusterSetup.ps1 -PathToClusterDataRoot c:\SfDevCluster\data -PathToClusterLogRoot c:\SfDevCluster\log -auto
Removing cluster configuration...
Opening TraceWriter FabricDeployer, path c:\SfDevCluster\log\Traces\FabricDeployer-638106697980303321.trace
Closing TraceWriter FabricDeployer, path c:\SfDevCluster\log\Traces\FabricDeployer-638106697980303321.trace
Cleaning existing certificates...
Certificates removed.
Stopping all logman sessions...
Cleaning log and data folder...
c:\SfDevCluster\data\_App\_Node_1\INFODO~1.API\INFODO~1.0\mscordbi.dll - Ingen tilgang.
c:\SfDevCluster\data\_App\_Node_3\INFODO~1.API\INFODO~1.0\mscordbi.dll - Ingen tilgang.
Using Cluster Data Root: c:\SfDevCluster\data
Using Cluster Log Root: c:\SfDevCluster\log
c:\SfDevCluster\data\_App\_Node_1\INFODO~1.API\INFODO~1.0\mscordbi.dll - Ingen tilgang.
c:\SfDevCluster\data\_App\_Node_3\INFODO~1.API\INFODO~1.0\mscordbi.dll - Ingen tilgang.
EnsureDirectoryCleaned : Cannot clean up c:\SfDevCluster\data fully as references are likely being held to items in it. Please remove those and retr
y.
At C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Scripts\ClusterSetupUtilities.psm1:525 char:5
+ EnsureDirectoryCleaned $clusterDataRoot
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,EnsureDirectoryCleaned
WARNING: Hints: Is some other process holding on to references?
ScriptHalted
Stop-Transcript : An error occurred stopping transcription: The host is not currently transcribing.
At C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1:54 char:5
+ Stop-Transcript
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Stop-Transcript], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.StopTranscriptCommand
I had a devenv process running, so it had a lock on some files;)

Unrea Engine Pixel Streaming Prepare Signalling Server in Power Shell

I am following this instruction [Link][1] on Unreal Documentation
But stuck at 2nd point Start the Servers
To prepare for the Signalling Server, start by opening PowerShell as
Administrator and running
SignallingWebServer\platform_scripts\cmd\setup.ps1.
In Power Shell I m getting error
PS C:\Windows\system32> SignallingWebServer\platform_scripts\cmd\setup.ps1
SignallingWebServer\platform_scripts\cmd\setup.ps1 : The module 'SignallingWebServer' could not be loaded. For more
information, run 'Import-Module SignallingWebServer'.
At line:1 char:1
+ SignallingWebServer\platform_scripts\cmd\setup.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (SignallingWebSe...s\cmd\setup.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoLoadModule
I want to pixel streaming the unreal engine project to veiw in web browser
[1]: https://docs.unrealengine.com/5.0/en-US/getting-started-with-pixel-streaming-in-unreal-engine/

"rm: cannot remove 'wslServer.sh': No such file or directory"

In my ongoing war with WSL2/VSCODE I'm trying to completely remove the .vscode-insiders directory from my machine.
rm -rf wont work, neither will delete from windows. Anyone know How I can destroy this thing?
I'm trying to get a dev environment set up with WSL2 VS CODE and Docker in Windows 10 insiders (18965).
I ran into problems trying to install the remote development pack, specifically the /ms-vscode-remote.remote-wsl-0.39.4 extension which is causing no end of problems.
However When I try to remove all vs code-insiders residue I get permissions problems with:
:/mnt/c/Users/micro/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.39.4/scripts/wslServer.sh
I cant delete it from the Ubuntu side with rm -rf
cannot remove 'wslServer.sh': No such file or directory
I cant delete it from windows explorer - no permissions
I cant delete it from powershell as admin running Remove-item.
Looked at all the existing answers on stack and none have a solution as far as i can see.
Would love some help?
Remove-Item : Access is denied
At line:1 char:1
+ Remove-Item wslServer.sh
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\Users\micro...ts\wslServer.sh:String) [Remove-Item], Unauthorized
AccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot find path
'C:\Users\micro.vscode-insiders\extensions\ms-vscode-remote.remote-wsl-0.39.4\scripts\wslServer.sh' because it does
not exist.
At line:1 char:1
+ Remove-Item wslServer.sh
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\micro...ts\wslServer.sh:String) [Remove-Item], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
Ctrl+alt+delete - right click 'Windows Subsystem For Linux' - end task.
Now try deleting the folder or let VScode do it for you.

Powershell fails to load DLL because manifest is missing

These statements:
[Environment]::Is64BitProcess
[Reflection.Assembly]::LoadFile("C:\MvxAPI\MvxSockx64.dll")
Generate:
True
Exception calling "LoadFile" with "1" argument(s): The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
At C:\GitRepo\PowerShellScripts\ApiDllTest.ps1:11 char:1
+ [Reflection.Assembly]::LoadFile("C:\MvxAPI\MvxSockx64.dll")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : BadImageFormatException
From a PowerShell program I've written, I am trying to send transactions to the ERP system (Infor's M3) via a DLL for APIs. The DLL is provided by the manufacture. Since I am not a system admin but just a nerd supporting the ERP system, I'm clueless as to what I'm doing and have gotten this far with Google but can't get any further. Your suggestions will be greatly appreciated.

Problems loading iTextSharp in PowerShell

I am having problem loading the iTextSharp.dll in PowerShell. Sometimes it works fine using either:
[System.Reflection.Assembly]::LoadFrom("C:\dll\itextsharp.dll")
Add-Type -Path C:\dll\itextsharp.dll'
However, most times I get the following error:
Exception calling "LoadFrom" with "1" argument(s):
"Could not load file or assembly 'file:/// C:\dll\itextsharp.dll'
or one of its dependencies. Operation is not supported.
(Exception from HRESULT: 0x80131515)"
At line:1 char:1
+ [System.Reflection.Assembly]::LoadFrom("itextsharp.dll")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileLoadException
I have tried unblocking the file but I still get the error above.
Looks like this on StackOverflow will probably solve your problem. Apparently you need to add the option <loadFromRemoteSources enabled="true" /> to the .EXEs config file to load an assembly from a network share.
I found this by searching for the HRESULT 0x80131515
I have found that the DLL works with PowerShell ISE (x86), but not the 64-bit version of PowerShell ISE.