Skip to content

Instantly share code, notes, and snippets.

View alexandair's full-sized avatar

Aleksandar Nikolić alexandair

View GitHub Profile
@alexandair
alexandair / test-script-duplicate.ps1
Created June 16, 2025 17:33
PowerShell test script (duplicated from af0f5a)
# Simple PowerShell Test Script
Write-Host "Hello from my test gist!" -ForegroundColor Green
Get-Date
Write-Host "This is a test gist created to verify GistPad functionality." -ForegroundColor Yellow
@alexandair
alexandair / README.md
Created June 16, 2025 17:25
Test gist with proper description from Copilot

Test GistPad Connectivity

This is a test gist to verify GistPad connectivity issues.

  • Created on: June 16, 2025
  • Purpose: Testing GistPad connectivity
  • Issue: GistPad not showing existing gists with descriptions
@alexandair
alexandair / 21830.ps1
Created June 14, 2025 23:26
Test 21830
function Test-Assessment-21830 {
[CmdletBinding()]
param()
Write-PSFMessage '🟦 Start' -Tag Test -Level VeryVerbose
$activity = "Checking Highly privileged roles are only activated in a PAW/SAW device"
Write-ZtProgress -Activity $activity -Status "Getting policy"
# Get all Conditional Access policies
@alexandair
alexandair / test-script.ps1
Created June 13, 2025 16:24
Simple PowerShell test script (Updated description on June 16)
# Simple PowerShell Test Script
Write-Host "Hello from my test gist!" -ForegroundColor Green
Get-Date
Write-Host "This is a test gist created to verify GistPad functionality." -ForegroundColor Yellow
$options = @{
AddToHistoryHandler = {
param( [string]$line)
return $line.Length -gt 3 -and $line[0] -ne ' ' -and $line[0] -ne ';'
}
}
Set-PSReadLineOption @options
{
"title": "Test tour",
"steps": [
{
"file": "Test-CodeTour.ps1",
"line": 4,
"description": "### Step 1\r\n\r\nThis is the first command in the script.\r\nIt will show you today's date. Simple as that.",
"contents": "\r\n# a script to test the CodeTour extension\r\n\r\nGet-Date\r\n\r\nfunction foo {\r\n Write-Output \"foo\"\r\n}\r\n\r\n# Call a function\r\nfoo\r\n\r\n"
},
{
$sourceuri = "ftp://ftp.example.com/myfolder/myfile.xml"
$filePath = "C:\temp\myfile.xml"
$username = "user"
$password = "password"
# Create a FTPWebRequest object to handle the connection to the ftp server
$ftprequest = [System.Net.FtpWebRequest]::create($sourceuri)
$credentials = New-Object System.Net.NetworkCredential($username,$password)
# set the request's network credentials for an authenticated connection
$sourceuri = "ftp://speedtest.tele2.net/1MB.zip"
$targetpath = "C:\temp\1mb.zip"
$username = "anonymous"
$password = "anonymous"
# Create a FTPWebRequest object to handle the connection to the ftp server
$ftprequest = [System.Net.FtpWebRequest]::create($sourceuri)
# set the request's network credentials for an authenticated connection