Posts

Learning Platforms and Courses

 We all need to upskill, but that does not need to come with a hefty pricetag. Here are some great resources to give you training and certification: Open Universities Australia Class Central Google Digital Garage Khan Academy edx Academic Earth MIT

Powershell: Why does my Google Sheet formula have a leading single quote?

I was recently writing a simple Powershell script to automatically create data in Google Sheets. I used the excellent post from  James Chambers  to show me the details of the process. The code is simple enough  1. Import-Module UMN-Google 2. Use Set-GSheetData to populate the data It all works until the Hyperlinks I created were being rendered as strings, with leading single quotes. This means they look pretty awful and I dont intend to manually correct them. #defeatsthepurpose. The solution is to force the Set-GSheetData with  -valueInputOption "USER_ENTERED"  which then overrides the default behaviour of setting the values to a string. Simple when you know how.

CISM Exam Prep - Recommended Learning

 I recently (successfully) completed the CISM exam and its a bit of a monster. Here are a few of my takeaways from the experience: * Read the questions very carefully. This can be a (mental) challenge as the time goes by but I found it was the little things in the exam questions that made the difference. * Choose your most effective study technique. Some people like courses, some people like books. I like using sample exams and examing the answers to understand not only the correct answer, but also why the other options were wrong. I have found this approach highly effective over my 20+ certifications across Microsoft, Google, AWS and now ISACA. I used the following study material: https://www.udemy.com/course/certified-information-systems-security-professional-cissp-k (Paid) https://www.udemy.com/course/certified-information-security-manager-cism-tests/ (Paid) https://examposter.com/isaca/cism-certified-information-security-manager/cism-part-01/ (Free) https://www.itexams.com/exam...

JIRA Data Extract into Google Sheets through an API

function callJIRAPI() { // first, clear the sheet contents           var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet() var range = sheet.getRange("A1:G100"); range.clearContent(); // create the auth token for the API request to JIRA var pair = "firstname.lastname@mydomain.com:<My API Key from JIRA>" var base64 = Utilities.base64Encode(pair) var authHeader = "Basic " + base64 var url = "https://mydomain.atlassian.net/rest/api/3/search?jql=<JQL Query here>" // execute the query and parse the result as JSON var response = UrlFetchApp.fetch(url, { headers: { Authorization: authHeader, ContentType: 'application/json' } }); var dataSet = JSON.parse(response.getContentText()); // Create an array to store the results and push the column headers. These should match to the columns extracted below var rows = [] rows.push(["JiraID","CreatedBy","AssignedTo","Du...

Extract user details into Excel from JIRA API in Powershell

Function Get-JIRAExtract { Param( [Parameter( Mandatory=$true, HelpMessage="JIRA id of the user")] [string]$assigneeId, [Parameter( Mandatory=$true, HelpMessage="Name of user.")] [string]$assigneeName, [Parameter( Mandatory=$false, HelpMessage="Target Folder.")] [string]$targetFolder = "c:\temp2" ) try { $token = "xxx" $pair = "fname.lname@company.com:$token" $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $base64 = [System.Convert]::ToBase64String($bytes) $basicAuthValue = "Basic $base64" $headers = @{ Authorization = $basicAuthValue } $url = "https://mycompany.atlassian.net/rest/api/3/search?maxResults=1000&jql=assignee%20in%20($assigneeId)AND created >= -24w AND status in ('Complete', 'In Progress', 'Resolved', 'Closed')" Write-Host "Call url $url" $json = Invoke-RestMethod -Uri $url -Method Get -Headers $headers...

How can I call a JIRA api through Powershell?

 Navigate to https://id.atlassian.com/manage-profile/security/api-tokens and create an API token Then use the following code: $pair = "me@example.com:<My token here>" $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $base64 = [System.Convert]::ToBase64String($bytes) $basicAuthValue = "Basic $base64" $headers = @{ Authorization = $basicAuthValue } $json = Invoke-RestMethod -Uri "https://<mydomain>.atlassian.net/rest/api/3/search?jql= <jql here>" -Method Get -Headers $headers