Skip to content

Instantly share code, notes, and snippets.

Avatar

Marc Kean marckean

  • Microsoft
  • Sydney, Australia
  • Twitter @marckean
View GitHub Profile
View SentralIndex.md

The following is an index of all documents from the APS Sentral site.

Note: For the links to work, you'll need to first logon to the main Sentral site itself. This is in order for the browser to download the cookie/s needed to authenticate.

TIP: so you can come back to this page after logging onto the main Sentral site, open this link in a new tab:

  • In Windows hold down the CTRL key while clicking the link
  • On a Mac, hold down the COMMAND key while clicking the link
  • On a phone, hold down on the link and choose from the menu to open in a new tab

You only have to logon once to the the main Sentral site. Once logged on to the the main Sentral site, come back to this page, the links below will work.

@marckean
marckean / Ben and Liam podcast download.ps1
Last active Dec 10, 2020
Download all Ben & Liam podcasts to your local computer
View Ben and Liam podcast download.ps1
$downloadlocation = "$env:USERPROFILE\downloads\BenLiam"
if(!(Test-Path $downloadlocation)) {New-Item -Path $downloadlocation -ItemType Directory}
# Get all the podcasts
$CompletePodcasts = @()
$page = 1
do {
$URL = "https://www.novafm.com.au/wp-json/nova/v1/infinite-scroll-posts?query_name=episodes&post_type=episode&meta_key=podcast_319425&paged=$page&__amp_source_origin=https%3A%2F%2Fwww.novafm.com.au"
$result1 = Invoke-WebRequest -Uri $URL | ConvertFrom-Json
if($result1){
View Get-Base64_of_Certificate.ps1
$RadiusServer_FQDN = "WP-DC-01.wp.local"
$RadiusServer_Extension = "IP security IKE intermediate"
$CertStoreRootPath = 'LocalMachine'
$RootCertStore = "Cert:\$CertStoreRootPath\My"
$RadiusServer_Extension1 = "Server Authentication"
$RadiusServer_Extension2 = "Client Authentication"
$VPNServer_Extension1 = 'IP security IKE intermediate'
## Radius Server
$RadiusCertificate = Get-ChildItem -Path $RootCertStore `
View Azure - Resize Virtual Machines (Parallel).ps1
<#
Written with PowerShell v7.0.1 - install available here https://github.com/PowerShell/powershell/releases
Written with version 4.2.0 of the Az PowerShell Module
available from here https://github.com/Azure/azure-powershell/releases/tag/v4.2.0-June2020 or run: Install-Module -Name Az -RequiredVersion 4.2.0 -AllowClobber
Migration instructions Azure.RM to Az - https://azure.microsoft.com/en-au/blog/how-to-migrate-from-azurerm-to-az-in-azure-powershell/
#>
##########################################################################################
############################ Logon to Microsoft Azure #############################
##########################################################################################
View sc_serv.conf
adminpassword=AdminPassword
publicserver=never
requirestreamconfigs=1
logfile=logs\sc_serv.log
w3clog=logs\sc_w3c.log
banfile=control\sc_serv.ban
ripfile=control\sc_serv.rip
portbase=8000
;Stream IDs
View Install-SHOUTcast-Windows.ps1
# Download the latest copy of SHOUTcast
$url = 'http://download.nullsoft.com/shoutcast/tools/sc_serv2_win64-latest.exe'
$exeoutput = "$env:TEMP\sc_serv2_win64-latest.exe"
Invoke-WebRequest -Uri $url -OutFile $exeoutput
# Setup SHOUTcast silently
$arguments = '/S'
Start-Process $exeoutput -ArgumentList $arguments -Wait
# Copy the SHOUTcast Config file
View Get-BGPCommunities.ps1
<#
Written with version 3.5.0 of the Azure PowerShell Module
available from here https://github.com/Azure/azure-powershell/releases/tag/v2.8.0-October2019
Install-Module -Name Az -Repository PSGallery -RequiredVersion 3.5.0 -Force -AllowClobber
Migration instructions Azure.RM to Az - https://azure.microsoft.com/en-au/blog/how-to-migrate-from-azurerm-to-az-in-azure-powershell/
#>
Login-AzAccount | Out-Null
$subscriptions = Get-AzSubscription
View Ignite2019sessions.json
This file has been truncated, but you can view the full file.
[
{
"@search.score": 1.0,
"attendeeCount": 393,
"hasLiveStream": true,
"sessionId": "83014",
"sessionInstanceId": "83014",
"sessionCode": "THR3091",
"sessionCodeNormalized": "THR3091",
View Azure - Swap out VM resource.ps1
<#
Written with version 2.8.0 of the Azure PowerShell Module
available from here https://github.com/Azure/azure-powershell/releases/tag/v2.8.0-October2019
or run: Install-Module -Name Az -RequiredVersion 2.8.0 -AllowClobber
Migration instructions Azure.RM to Az - https://azure.microsoft.com/en-au/blog/how-to-migrate-from-azurerm-to-az-in-azure-powershell/
#>
#$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
Add-AzAccount
View PowerShell_Azure_Module_Switcher.ps1
# Switch to the Azure AzureRM PowerShell module
if(Get-Module -Name Az*){
Remove-Module -Name Az*
Import-Module -Name AzureRM -Force}
# Switch to the Azure AZ PowerShell module (
if(Get-Module -Name AzureRM*){
Remove-Module -Name AzureRM*
Import-Module -Name Az -Force}