I am using the CV Powershell module found on GitHub - Commvault/CVPowershellSDK: Developer SDK - Powershell. I can successfully log into our Commvault server and run get-cvjob commands just fine so i know it is authenticating and working. What I am having trouble with is using the command Get-CVSchedulePolicy. When I just run it by itself, I get the output INFO: Get-CVSchedulePolicy: no policies found. I have a ton of Schedules. My goal is to disable an existing. Schedule Policy using the command Disable-CVSchedulePolicy. I am using an account that has full Commvault permission, and I can do this in the Commcell Java client just fine. What am I missing trying to see all the existing Schedule Policies and then disabling one of them via powershell? I looked at this Get-CVSchedulePolicy (commvault.com) and tried various swithes. Please help.
Trouble with CVPowershellSDK module Get-CVSchedulePolicy
Hi
Just to confirm, there are schedule policies to be disabled?
There is a difference between schedules and schedule policy, so I’m just wanting to make sure before we go further.
https://documentation.commvault.com/2023e/expert/6764_viewing_schedule_policy.html
https://documentation.commvault.com/2023e/expert/6634_viewing_job_schedules.html
Regards,
Chris
![Contributor 5 Badge](https://uploads-eu-west-1.insided.com/commvault-eu/attachment/23dbdb21-3596-44c3-b682-90c85342bfe7_thumb.png)
I am specifically referring to Schedule Polices. I want to disable a schedule policy. For example, how do I disable the Schedule Policy “1TESTExample”. Screen Shot Attached? I would think the following commands would get this information.
Get-CVSchedulePolicy -Name 1TESTExample
Output: INFO: Get-CVSchedulePolicy: policy not found having name [1TESTExample]
Disable-CVSchedulePolicy -Name 1TESTExample
Output: INFO: Get-CVSchedulePolicy: policy not found having name [1TESTExample]
Output: INFO: Disable-CVSchedulePolicy: policy not found having name [1TESTExample]
![](https://uploads-eu-west-1.insided.com/commvault-eu/attachment/c53627fc-8c67-4736-86b9-a5e71b86e248.jpg)
I think your problem lies in the fact that it is a kind of a mess when it comes to the location where you can find the SDKs. There are currently still two repos and you were pointing is the older one. So, please look into:
https://www.powershellgallery.com/packages/CommvaultPowerShell
There is some documentation here but very limited. Right now all cmd-lets of the V1 version were added to the V2, so it should be able to deliver the same functionality.
https://github.com/Commvault/CVPowershellSDKV2
Mind the Commvault version that you are running:
![](https://uploads-eu-west-1.insided.com/commvault-eu/attachment/1720955c-154c-4c51-ad43-faa407575d23.png)
I hope one day we will get a development oriented portal that acts as the central go-to place for all automation initiatives and code repositories.
![Contributor 5 Badge](https://uploads-eu-west-1.insided.com/commvault-eu/attachment/23dbdb21-3596-44c3-b682-90c85342bfe7_thumb.png)
Thanks for the info about the other location. So I removed my previous version. Then I installed the new one for CommvaultPowershell 0.2.14. Did they remove the Connect-CVServer cmdlet? I.E. Now you have to use the powershell invoke command to authenticate in the API? I.E.
Invoke-SetupLogin
Will the other PowerShell CommVault commands work after authenticating via Invoke-SetupLogin?
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.