Skip to content

Instantly share code, notes, and snippets.

@negeric
negeric / Get-AzureOrphanedInterfaces.ps1
Created Mar 28, 2018
Displays and removes Azure Network Interfaces that are not associated with a VM
View Get-AzureOrphanedInterfaces.ps1
<#
.SYNOPSIS
Deletes Azure Network Interfaces not associated with a VM
.DESCRIPTION
Iterates through the network interfaces in an Azure subscription
And deletes the interfaces not associated with a VM
Will log to a file if LogFile parameter is passed
.PARAMETER Force
Do not ask permission for each interface
This will delete all interfaces that are not associated with a VM
View Remove-AzureBlobStorageRunBook.ps1
<#
.SYNOPSIS
This script will enumerate through a Storage Account and delete files that are older than x
.DESCRIPTION
The script requires you to log into your account then automatically pulls your Account Keys.
Using the Storage Account Keys, the script searches for files older than the provided date
.PARAMETER ResourceGroup
Name of the Resource Group that the Storage Account is in - Required
.PARAMETER StorageAccount
Name of the Storage Account that the Container is in - Required
@negeric
negeric / Remove-AzureBlobStorage.ps1
Created Feb 7, 2018
This script will enumerate through a Storage Account and delete files that are older than x
View Remove-AzureBlobStorage.ps1
#requires -version 2
<#
.SYNOPSIS
This script will enumerate through a Storage Account and delete files that are older than x
.DESCRIPTION
The script requires you to log into your account then automatically pulls your Account Keys.
Using the Storage Account Keys, the script searches for files older than the provided date
.PARAMETER SubscriptionName
Name of your Azure Subscription - Required
.PARAMETER ResourceGroup