Skip to content

cohesity/cohesity-powershell-module

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Cohesity PowerShell Module

License: Apache2 GitHub release { PowerShell + PowerShell Core } Maintenance

Overview

This project provides a PowerShell Module for interacting with the Cohesity DataPlatform. It includes cmdlets useful for automating common tasks and orchestrating workflows in your environment. This PowerShell module can be used on Windows, Linux and Mac OS.

Table of contents 📜

Let's get started ⚒️

Pre-req

The pre-requisites for using the Cohesity PowerShell Module are as below:

  • Cohesity Cluster running software version 6.0 or higher and Powershell 5.1 or higher. For more details refer this link

Online installation

You can install Cohesity PowerShell Module directly using the PowerShell Gallery.

** PowerShell Core (MacOS and Linux) **

Install-Module -Name Cohesity.PowerShell.Core

** Windows PowerShell (Windows) **

Install-Module -Name Cohesity.PowerShell

** Note: Windows with powershell version 7 or higher supports only Powershell Core

Some samples to get you going 💡

  • Refer samples folder to find more examples.
  • More samples can be found here under Examples section

Documentation 📖

Contribute 🤝

Installation tips

If you are running PowerShell as a user without elevated privileges (non-admin user), you may need to add -Scope CurrentUser to these commands. In some cases, you may also need to run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser to set the execution policy that allows import of the module.

Offline installation

  • Download the offline package (.zip) from GitHub release page
    • For windows, use Cohesity.PowerShell.zip
    • For linux and MacOS, use Cohesity.PowerShell.Core.zip
  • Copy over this zip file to the target machine
  • Unzip the contents of the zip file to one of the directory paths mentioned in the output of $env:PSModulePath on the target machine.

Steps to upgrade

Tip: It's recommended to always use the latest version of the Cohesity PowerShell Module to get the new features and bug-fixes.

You can uninstall the previous version of the Cohesity PowerShell Module using the uninstall steps mentioned below and then install the new version.

Alternatively, you can also use the steps below to upgrade to the latest version of the module. Note that using Update-Module can cause multiple versions of this module on your system. You may later need to remove older versions of the module manually.

** PowerShell Core **

Update-Module -Name Cohesity.PowerShell.Core

** Windows PowerShell **

Update-Module -Name Cohesity.PowerShell

Steps to uninstall

** PowerShell Core **

Uninstall-Module -Name Cohesity.PowerShell.Core

** Windows PowerShell **

Uninstall-Module -Name Cohesity.PowerShell

Suggestions and Feedback

We would love to hear from you. Please send your suggestions and feedback to: cohesity-api-sdks@cohesity.com

License 🛡️

Apache 2.0