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
@( | |
'CVE-2025-24065' | |
'CVE-2025-24068' | |
'CVE-2025-24069' | |
'CVE-2025-29828' | |
'CVE-2025-3052' | |
'CVE-2025-32710' | |
'CVE-2025-32712' | |
'CVE-2025-32713' | |
'CVE-2025-32714' |
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
$h = 'C:\windows\system32\drivers\etc\hosts' | |
@( | |
"127.0.0.1 `t dev.localdev.info" | |
) | % { | |
(cat $h) + $_ | Out-File $h -Encoding ascii | |
} |
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
# yyyyMMdd_HHmmsszzz | % Replace ':' | |
dir -File | % { | |
$d = $_.BaseName.Substring(0,8) | |
md $d -ea 0 | |
move $_.FullName $d | |
} | |
$dir = dir -Directory |
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
<# | |
.SYNOPSIS | |
Given a list of paths, remove all paths whose parent is already in the list. | |
#> | |
function Get-PathCollapsed | |
{ | |
param ( | |
[string[]] $Paths | |
) |
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
dir | % { | |
$exif = exiftool -G2 -json $_.FullName | ConvertFrom-Json | |
$exif.'Camera:Model' | |
} |
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
$site = Get-SPSite http://site.local/ | |
$query = New-Object -TypeName Microsoft.SharePoint.SPAuditQuery($site) | |
$query.RowLimit = 10 | |
$query.SetRangeStart((Get-Date).Date) | |
$query.AddEventRestriction([Microsoft.SharePoint.SPAuditEventType]::ChildMove) | |
$site.Audit.GetEntries($query) | Out-GridView |
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
param | |
( | |
[Parameter(Mandatory = $true)][string]$clientId, | |
[Parameter(Mandatory = $true)][string]$tenantId, | |
[Parameter(Mandatory = $true)][string[]]$upn | |
) | |
Install-Module AzureAD | |
Update-Module AzureAD |
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
Get-Process | select name, cpu, workingset64 | group name | %{ | |
[pscustomobject] @{ | |
name = $_.Name | |
WorkingSet64 = [math]::round(($_.group | measure workingset64 -Sum | % sum)/1gb, 2) | |
} | |
} | sort workingset64 -Descending | select -first 10 |
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
= (Path as text) => let | |
Custom1 = Csv.Document(File.Contents(Path),[Delimiter=",", Columns=17, Encoding=1252, QuoteStyle=QuoteStyle.None]), | |
#"Promoted Headers" = Table.PromoteHeaders(Custom1, [PromoteAllScalars=true]), | |
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"timeStamp", type text}, {"elapsed", Int64.Type}, {"label", type text}, {"responseCode", Int64.Type}, {"responseMessage", type text}, {"threadName", type text}, {"dataType", type text}, {"success", type logical}, {"failureMessage", type text}, {"bytes", Int64.Type}, {"sentBytes", Int64.Type}, {"grpThreads", Int64.Type}, {"allThreads", Int64.Type}, {"URL", type text}, {"Latency", Int64.Type}, {"IdleTime", Int64.Type}, {"Connect", Int64.Type}}), | |
#"Extracted First Characters" = Table.TransformColumns(#"Changed Type", {{"timeStamp", each Text.Start(_, 10), type text}}), | |
#"Added Custom" = Table.AddColumn(#"Extracted First Characters", "Custom", each #datetime(1970,1,1,0,0,0) + #duration(0,8,0,N |
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
$path = 'log.csv' | |
cat $path | select -First 1 > out.csv | |
cat $path | select -skip 1 | where { | |
$log = $_.Split(',') | |
$ts = [long] $log[0] | |
$elapsed = [long] $log[1] | |
Write-Progress -Activity $ts | |
$elapsed -gt 7000 | |
} | tee -FilePath .\out.csv -Append |
NewerOlder