function Get-ComicInfo { [CmdletBinding()] param ( [Parameter()] [String] [Alias("Name", "ComicFile")] $Path )
function Click-Button1 { | |
# Specify the path to your logo image file | |
$logoPath = "C:\temp\stv\stv-04.png" | |
# Get the current Word document | |
$doc = $app.ActiveDocument | |
# Add the logo to the document | |
$logoShape = $doc.Shapes.AddPicture($logoPath, @{LinkToFile = $false; SaveWithDocument = $true }).ConvertToInlineShape() |
Add-Type -Path "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\Office15\Microsoft.Office.Interop.Word.dll" # Load Word Interop assembly | |
$Word = New-Object -ComObject Word.Application # Create new Word object | |
# Get Active Document | |
$doc = $word.ActiveDocument # Get active document | |
# Add Logo | |
$logoPath = "C:\temp\stv\stv-04.png" # Path to logo | |
$logoShape = $doc.Shapes.AddPicture($logoPath, $false, $true).ConvertToInlineShape() # Add logo | |
$logoShape.LockAspectRatio = $true # Lock aspect ratio |
$GasStations = (Invoke-WebRequest -Uri "https://api.e-control.at/sprit/1.0/search/gas-stations/by-address?latitude=48.2505077&longitude=16.4019153&fuelType=SUP&includeClosed=false" -ContentType application/json).Content | ConvertFrom-Json | Where-Object { $_.Prices -ne $null } | Select-Object Name, Location, distance, prices
foreach ($GasStation in $GasStations) { [PSCustomObject]@{ Name = $GasStation.Name Location = $GasStation.Location.address "Distance(km)" = [System.Math]::Round($GasStation.Distance, 2) Price = $GasStation.prices.amount } }
Get-ChildItem | ForEach-Object { (Get-ChildItem $_.Fullname -Recurse | Where-Object { $_.Name -like "*.cue" } | Select-Object name).Name | Out-File "$($_.FullName)\$($_.Name).m3u" } |
Get Permissions | |
# MS Graph Permissions | |
(Get-AzAdServicePrincipal -ApplicationId 00000003-0000-0000-c000-000000000000).AppRole | Select * | |
(Get-AzAdServicePrincipal -ApplicationId 00000003-0000-0000-c000-000000000000).Oauth2PermissionScope | Select * | |
# Azure AD Graph | |
(Get-AzAdServicePrincipal -ApplicationId 00000002-0000-0000-c000-000000000000).AppRole | Select * | |
(Get-AzAdServicePrincipal -ApplicationId 00000002-0000-0000-c000-000000000000).Oauth2PermissionScope | Select * |
oh-my-posh init pwsh --config C:\Users\Fabia\AppData\Local\Programs\oh-my-posh\themes\craver.omp.json | Invoke-Expression
Set-PSReadLineOption -EditMode Emacs -PredictionSource history -PredictionViewStyle ListView
($FileSize | Measure-Object -Sum length).Sum / 1GB |