<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Warlock</title>
    <description>The latest articles on DEV Community by Warlock (@direwolv3s).</description>
    <link>https://dev.to/direwolv3s</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F734575%2F2c49cbd5-4dee-4a4d-9b4f-4adee296bc0c.jpg</url>
      <title>DEV Community: Warlock</title>
      <link>https://dev.to/direwolv3s</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/direwolv3s"/>
    <language>en</language>
    <item>
      <title>Citrix CVAD Cloud Api Scripting
</title>
      <dc:creator>Warlock</dc:creator>
      <pubDate>Sun, 06 Mar 2022 01:25:35 +0000</pubDate>
      <link>https://dev.to/direwolv3s/citrix-cvad-cloud-api-scripting-2mno</link>
      <guid>https://dev.to/direwolv3s/citrix-cvad-cloud-api-scripting-2mno</guid>
      <description>&lt;p&gt;I created a PowerShell wrapper module for Citrix Cloud CVAD API, the original goal was just to understand the new API and to see what would be possible. But it ended up allowing me to automate tasks, that I previously gave up on because of Windows and Windows PowerShell versioning ext.&lt;/p&gt;

&lt;p&gt;Using this module, I was able to rewrite all my PowerShell scripts for on-prem environments, without needing the Citrix PSSnapins. This enabled me to move my setup to PowerShell 7 with ease. My next goal is to run everything from a non-Windows system and then some actions/tasks from GitHub Actions or Azure DevOps Pipelines.&lt;/p&gt;

&lt;p&gt;Managing multiple clients is also much simpler now, I reuse the same scripts between all my clients to create their Daily and Monthly reporting. All I need to change is the API Token, and the module takes care of the rest.&lt;/p&gt;

&lt;p&gt;I hope this will help other Citrix Admins out there and make their lives a bit easier. Please contact me on LinkedIn or GitHub for any bugs or enhancements.&lt;/p&gt;

&lt;p&gt;Follow these steps to get started:&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;You will need access to the Citrix Cloud API. Follow Get API Access to gain access.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Install-Module -Name CTXCloudApi -Verbose&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Import-Module CTXCloudApi -Verbose -Force&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Get-Command -Module CTXCloudApi&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;Get-Help About_CTXCloudApi&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;Connect-CTXAPI&lt;/code&gt; with the details obtained from Citrix Cloud. This will connect and create the needed headers for other commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 1:
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;$splat = @{&lt;br&gt;
    Customer_Id = "xxx"&lt;br&gt;
    Client_Id = "xxx-xxx-xxx-xxx"&lt;br&gt;
    Client_Secret = "yyyyyy=="&lt;br&gt;
    Customer_Name = 'HomeLab'&lt;br&gt;
}&lt;br&gt;
$APIHeader = Connect-CTXAPI @splat&lt;br&gt;
Get-CTXAPI_HealthCheck -APIHeader $APIHeader -region eu -ReportPath C:\Temp\&lt;/code&gt;&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>citrix</category>
      <category>api</category>
    </item>
  </channel>
</rss>
