This file contains hidden or 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-AvailableComObjects { | |
| $classesCom = '' | |
| $classes = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SOFTWARE\\Classes').GetSubKeyNames() | |
| [regex]::Matches($classes, '\w+\.\w+').Value | % {if ([Microsoft.Win32.Registry]::LocalMachine.OpenSubKey("SOFTWARE\\Classes\\$_\\CLSID")) {$classesCom += "$_`r`n"}} | |
| $classesCom.Replace("`r`n",' ').Split(' ') | Select-Object -Unique | |
| } |
This file contains hidden or 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
| SendMode Input | |
| !z:: | |
| loop 26 { | |
| i := Asc("a") + A_Index - 1 | |
| loop 26 { | |
| j := Asc("a") + A_Index - 1 | |
| loop 26 { | |
| k := Asc("a") + A_Index - 1 | |
| l := Chr(i) | |
| m := Chr(j) |
This file contains hidden or 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
| enum SyslogSeverity | |
| { | |
| Emergency = 0 | |
| Alert = 1 | |
| Critical = 2 | |
| Error = 3 | |
| Warning = 4 | |
| Notice = 5 | |
| Informational = 6 | |
| Debug = 7 |
This file contains hidden or 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 Set-WakeEnabled | |
| { | |
| <# | |
| .SYNOPSIS | |
| Set WoL on nic | |
| Author: Jan-Henrik Damaschke (@jandamaschke) | |
| License: BSD 3-Clause | |
| Required Dependencies: None |
This file contains hidden or 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
| $tenantId = "00000000-0000-0000-0000-000000000000" # Replace with your tenant ID | |
| $graphApiAppId = "00000003-0000-0000-c000-000000000000" # Well known ID | |
| $msiName = "MSINAME" # Name of your managed identity e.g. name of Function or Logic App | |
| $graphPermissions = @("Directory.Read.All", "User.Read.All") # Add or remove permissions | |
| Connect-AzureAD -TenantId $tenantId | |
| $msi = Get-AzureADServicePrincipal -Filter "displayName eq '$msiName'" # Can take a few seconds, add a sleep if necessary | |
| $graphApiAppRegistration = Get-AzureADServicePrincipal -Filter "appId eq '$graphApiAppId'" | |
| $appRoles = $graphApiAppRegistration.AppRoles | Where-Object { $graphPermissions -contains $_.Value -and $_.AllowedMemberTypes -contains "Application" } | |
| foreach ($appRole in $appRoles) { |
This file contains hidden or 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
| Class AdvancedPing | |
| { | |
| hidden [string]$_packets | |
| hidden [string]$_duration | |
| hidden [string]$_hostName | |
| hidden [string]$_ip | |
| hidden [int]$_bytes = 64 | |
| hidden [int]$_ttl = 57 | |
| hidden [int]$_timeout = 120 | |
| hidden [int]$_interval = 1000 |
This file contains hidden or 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
| <#PSScriptInfo | |
| .GUID 0c6df4be-ff4b-481f-a7eb-31637849e580 | |
| .VERSION 1.0 | |
| .AUTHOR Jan-Henrik Damaschke | |
| .COMPANYNAME Visorian GmbH |
This file contains hidden or 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
| $xmlpath = 'C:\Temp\DeploymentConfigTemplate.xml' | |
| $features = New-Object -TypeName System.Collections.ArrayList | |
| [xml]$xml = Get-Content $xmlpath | |
| $xml.Objs.Obj.LST.Obj | ForEach-Object {$null = $features.Add($_.GetElementsByTagName('ToString').'#text')} | |
| for ($i = 0; $i -lt $features.Count; $i++) | |
| { | |
| $features[$i] = $features[$i].Substring($features[$i].IndexOf('_') + 1).Replace('_','-') | |
| } | |
| $features |
This file contains hidden or 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
| $storageTable = (Get-AzStorageTable -Context $storageContext -Name $storageTableName).CloudTable | |
| $resources = Search-AzGraph -Query 'where type !in ("microsoft.compute/virtualmachines/extensions", "microsoft.compute/restorepointcollections", "microsoft.portal/dashboards")| project id, name, location, resourceGroup, properties.storageProfile, properties.hardwareProfile, type' -First 2000 | |
| foreach ($res in $resources) { | |
| $properties = $res.PSObject.Properties | |
| $tableEntry = @{} | |
| foreach ($prop in $properties) { | |
| if ($prop.value) { | |
| $tableEntry.add($prop.name, $prop.value) | |
| } |
This file contains hidden or 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
| { | |
| "description": "Analyze API call result.", | |
| "type": "object", | |
| "properties": { | |
| "status": { | |
| "description": "Status of the analyze operation.", | |
| "enum": [ | |
| "success", | |
| "partialSuccess", | |
| "failure" |
NewerOlder