Skip to content

Instantly share code, notes, and snippets.

View marckean's full-sized avatar

Marc Kean marckean

View GitHub Profile
# Like an inventory of all blobs across all storage accounts
$Subscription_IDs = @("ID_One-hf49h4h98h", "ID_Two-8f4jfj2409")
foreach ($Subscription_ID in $Subscription_IDs) {
Get-AzSubscription -SubscriptionId $Subscription_ID | Select-AzSubscription
# Retrieve all storage accounts
$storageAccounts = Get-AzStorageAccount | where { !($_.defaultToOAuthAuthentication) -and $_.AllowBlobPublicAccess -eq $true -and $_.StorageAccountName -notmatch 'cs.*' -and $_.StorageAccountName -ne 'dtaawsarchive'}

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 December 10, 2020 00:53
Download all Ben & Liam podcasts to your local computer
$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){
$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 `
<#
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 #############################
##########################################################################################
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
# 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
<#
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
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",
"title": "Gain Efficiencies in Security Response with ServiceNow and Azure Sentinel Integration powered by Microsoft Graph",
<#
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