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
| #requires -version 5.1 | |
| Function Get-AVStatus { | |
| <# | |
| .Synopsis | |
| Get anti-virus product information. | |
| .Description | |
| This command uses WMI via the Get-CimInstance command to query the state of installed anti-virus products. The default behavior is to only display enabled products, unless you use -All. You can query by computername or existing CIMSessions. | |
| .Example |
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
| # CU KBs and DL links https://www.catalog.update.microsoft.com/Search.aspx?q=2021-03%20cumulative%20update | |
| #Optional Runtime Variable $AutoReboot False by default. | |
| "`$AutoReboot set to '$AutoReboot'" | |
| # Get Windows Version | |
| $winVer = Get-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion" | | |
| Select-Object -Property ReleaseID,@{ | |
| n='Version'; e={[System.Version]('{0}.{1}.{2}' -f [int]$_.CurrentMajorVersionNumber,[int]$_CurrentMinorVersionNumber,[int]$_.CurrentBuildNumber)}} | |
| $kbs = @{ |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am jrdnr on github. | |
| * I am jrdnr (https://keybase.io/jrdnr) on keybase. | |
| * I have a public key ASDk9_-qGILludu2PsKlxuEVfA3eQouG0J1cnZYMrOXE1go | |
| To claim this, I am signing this object: |
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
| if ($env:SyncroModule){Import-Module $env:SyncroModule} | |
| $PartOfDomain = (Get-WmiObject -Class Win32_ComputerSystem).PartOfDomain | |
| # Check for network connections set to Public | |
| [hashtable]$NetworkConnections = @{} | |
| try { | |
| $networkInfo = Get-NetConnectionProfile -ErrorAction Stop | |
| } |
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
| # Prerequisites: You must have a custom asset field | |
| # Name: "Bitlocker Drives" | |
| # Type: "Text area" | |
| # | |
| try{ | |
| # Get Bitlocker Volumes or exit. | |
| $BitLockerVolume = Get-BitLockerVolume -ErrorAction stop | |
| # Create output as [string] for Text area Asset-Field. |
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
| $PMESetup_detailsURI = 'https://sis.n-able.com/Components/MSP-PME/latest/PMESetup_details.xml' | |
| try { | |
| $PMESetup_details = Invoke-RestMethod $PMESetup_detailsURI | |
| #This xml file has some weird characters at the start of the first line | |
| #Splitting on '<\?xml.*\?>' and selecting last part as Powershell does not need that line to parse xml | |
| [xml]$x = ($PMESetup_details -split '<\?xml.*\?>')[-1] | |
| $PMEdetails = $x.ComponentDetails | |
| } | |
| catch [System.Net.WebException] { | |
| Write-Output 'Error Fetching PMESetup_Details.xml Doublecheck your Source URL!!' |
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
| # Using the following file from | |
| # https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10-million-password-list-top-100000.txt | |
| #$FilePath = 'C:\git\SecLists\Passwords\Common-Credentials\10-million-password-list-top-500.txt' | |
| $FilePath = 'C:\git\SecLists\Passwords\Common-Credentials\10-million-password-list-top-10000.txt' | |
| #$FilePath = 'C:\git\SecLists\Passwords\Common-Credentials\10-million-password-list-top-100000.txt' | |
| #$FilePath = 'C:\rockyou.txt' | |
| $LineLengthFilter = 1 |
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
| #requires -Version 4.0 | |
| <# | |
| Author: Luke Murray (Luke.Geek.NZ) | |
| Version: 0.1 | |
| Purpose: Windows 10 Baseline Hardening using DSC per DoD DISA STIG recommendations 22/06/18. | |
| Modified to include comments explaining config by Frankie McDonough 01/23/19. | |
| #> | |
| Configuration 'Win10' | |
| { |
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-ChocoJsonPackage { | |
| $PackageCacheSec = (Get-Date).AddSeconds('-60') | |
| $ChocojsonList = Join-Path -Path $env:ChocolateyInstall -ChildPath 'ChocoInstalled.json' | |
| if ( $PackageCacheSec -lt (Get-Item $ChocojsonList -ErrorAction SilentlyContinue).LastWriteTime ) { | |
| $res = (Get-Content -Raw $ChocojsonList | ConvertFrom-Json) | |
| } else { | |
| choco list -lo -r | ConvertFrom-Csv -Header 'Name', 'Version' -Delimiter "|" -OutVariable res | ConvertTo-Json | Out-File $ChocojsonList | |
| } |