Skip to content

PowerShell helper to manage local Service Fabric applications

License

Notifications You must be signed in to change notification settings

jhonnyelhelou91/ServiceFabricHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Service Fabric Helper

PowerShell Helper scripts to manage Service Fabric services.

Getting Started

  • Copy the files
  • Open Command Line or PowerShell (Window + X, A)
  • If you opened Command Prompt, then type powershell in order to use PowerShell commands
  • Navigate to the scripts directory
    cd your_directory
  • Type
    Import-Module .\ServiceFabricHelper.psm1
  • Now you can use the methods from your PowerShell session

Adding Script to Profile [Optional]

  • Enable execution policy using PowerShell Admin
    Set-ExecutionPolicy Unrestricted
  • Navigate to the profile path
    cd (Split-Path -parent $PROFILE)
  • Open the location in Explorer
    ii .
  • Create the user profile if it does not exist
    If (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
  • Import the module in the PowerShell profile
    Import-Module -Path script_directory -ErrorAction SilentlyContinue

Examples

Remove-AllServiceFabricServices Example

Remove all Service Fabric applications from your local cluster

Remove all Service Fabric services

Remove-AllServiceFabricServices

Remove-ServiceFabricApplication Example

Remove Service Fabric application

Remove service fabric application by project name and path

Remove-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\'

Remove service fabric application by project name, path and application name

Remove-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\' -AppName 'fabric:\MyTestProject.Test@0'

Remove service fabric application by project name, path and application name without deleting application type

Remove-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\' -AppName 'fabric:\MyTestProject.Test@0' -DeleteType $false

Update-ServiceFabricApplication Example

Update Service Fabric application

Update service fabric application by project name and path

Update-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\'

Update service fabric application by project name and path using a different publish profile

Update-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\' -Node 'Local.5Node'

Update service fabric application by project name, path and solution name

Update-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\' -SolutionName 'C:\git\Service Fabric\TestProject\TestProject.sln'

Update service fabric application by project name and path using specific msbuild

Update-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\' -MsbuildPath 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe'

Update service fabric application by project name, path and application name

Update-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\' -AppName 'fabric:\MyTestProject.Test@0'

Update service fabric application by project name, path and application name without deleting application type

Update-ServiceFabricApplication -ProjectName 'Test' -Path 'C:\git\Service Fabric\TestProject\' -AppName 'fabric:\MyTestProject.Test@0' -DeleteType $false

About

PowerShell helper to manage local Service Fabric applications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published