This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-InstalledSoftware { | |
[cmdletbinding()] | |
param( | |
[parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] | |
[string[]]$ComputerName = $env:ComputerName | |
) | |
begin { | |
$UninstallRegKey = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Login to Azure | |
Login-AzureRmAccount | |
# Select a specific subscription for the context | |
Get-AzureRmSubscription | Out-GridView -PassThru -Title 'Select Subscription' | Select-AzureRmSubscription | |
# Get all the Hybrid Connections from all namespaces in all resource groups | |
$hybridConnections = Get-AzureRmResource -ResourceType Microsoft.Relay/namespaces | ForEach-Object { | |
$resourceGroupName = $_.ResourceGroupName | |
Get-AzureRmRelayHybridConnection -ResourceGroupName $resourceGroupName -Namespace $namespace.Name | ForEach-Object { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-ExtendedAttribute { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true, | |
ValueFromPipeline = $true, | |
ValueFromPipelineByPropertyName = $true)] | |
[Alias(‘FullName’, ‘PSPath’)] | |
[string[]]$Path, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-AzVmSizesByLocation { | |
[CmdletBinding()] | |
param($LocationFilter = '*') | |
Write-Verbose -Message 'Getting all locations with the vmSizes providers' | |
$locations = Get-AzResourceProvider | | |
Where-Object { $_.ResourceTypes.ResourceTypeName -contains 'locations/vmSizes' } | | |
Select-Object -ExpandProperty Locations | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PARAM( | |
$RemoteComputer = $env:COMPUTERNAME, | |
$Sender, | |
$Message = (Get-Date), | |
$ImageFile | |
) | |
function New-ToastNotification { | |
param($Sender, $Message, $ImageBase64) |
OlderNewer