CLI Reset Local Cluster (Rebuild Clusters according to Manifest) - azure-service-fabric

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;)

Related

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.

[Get-Content], ItemNotFoundException : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand in VSTS PowerShell task

Am working on ARM Templates Deployment using powershell Command line
$manifestDetails = Get-Content ./manifest.json | ConvertFrom-Json
which is going to be find and run the .json file .It is running fine in my local PC. But when am running the same line through VSTS PowerShell task, then am receiving following issue:
At C:\XX_work\r7\a\CIBuild\drop\XX\XX\Deployment\Manif
estAzureDeployment.ps1:191 char:21
+ $manifestDetails = Get-Content ./manifest.json | ConvertFrom-Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\XX...a\manifest.json:String) [Get-Content], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
So, please give me suitable suggestions for this issue
Using absolute path through built-in release variable instead.
For example, System.DefaultWorkingDirectory ($(System.DefaultWorkingDirectory)): The directory to which artifacts are downloaded during deployment of a release. The directory is cleared before every deployment if it requires artifacts to be downloaded to the agent. Same as Agent.ReleaseDirectory and System.ArtifactsDirectory.

An error occurred while reading the restart journal

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.

Getting error while exporting azure db using powershell

Followed Export SQL database example using link :
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-export-powershell#export-sql-database-example
Getting below error:
New-AzureRmSqlDatabaseExport : ResourceNotFound: The Resource 'Microsoft.Sql/servers/XXX.database.windows.net/databases/[DBNAME]' under resource group 'Default-SQL-SoutheastAsia' was
not found.
At [FilePath]\sample.ps1:24 char:18
+ $exportRequest = New-AzureRmSqlDatabaseExport –ResourceGroupName $ResourceGroupN ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmSqlDatabaseExport], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet.NewAzureSqlDatabaseExport
Get-AzureRmSqlDatabaseImportExportStatus : Cannot bind argument to parameter 'OperationStatusLink' because it is null.
At [FilePath]\sample.ps1:30 char:63
+ Get-AzureRmSqlDatabaseImportExportStatus -OperationStatusLink $exportRequest.Ope ...
+ CategoryInfo : InvalidData: (:) [Get-AzureRmSqlDatabaseImportExportStatus], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Azure.Commands.Sql.ImportExport.Cmdlet.GetAzureSqlDatabaseImportExportStatus
Any help?
I had this same issue today, actually. I think if you change your server name to not use the fully-qualified name, that might do it. So, just use "xxxxx."
At least that's what worked for me.
You need to verify that your Automation account has latest modules imported and are up to date (AzureRM.Automation – AzureRM.Profile – AzureRM.Sql) atleast to Version: 2.5.0. If modules show a different version, i.e. 1.0.3 then:
navigate to assets in the automation account, select modules and click on
Update Azure Modules
.
Wait for the modules to get updated it normally takes a few minutes