Skip to content

Instantly share code, notes, and snippets.

View homotechsual's full-sized avatar

Mikey O'Toole homotechsual

View GitHub Profile
@homotechsual
homotechsual / installNinjaOneAgent.sh
Created January 30, 2025 22:11
Install NinjaOne Agent and Rosetta2
#!/bin/bash
# SYNOPSIS
## Software Deployment - MDM - NinjaOne Agent
# DESCRIPTION
## Uses documentation fields to pull client specific Printix information to download that client's installer from Printix and install it on the endpoint.
# NOTES
## 2024-01-10: Initial version
# LINK
## Blog post: https://homotechsual.dev/2024/01/10/Deploy-Printix-NinjaOne/
# Define initial variables
@homotechsual
homotechsual / NinjaOne.Registry.ShouldBe.ps1
Created January 30, 2025 16:12
Registry.ShouldBe Ninja
# Utility Function: Registry.ShouldBe
## This function is used to ensure that a registry value exists and is set to a specific value.
function Registry.ShouldBe {
[CmdletBinding(DefaultParameterSetName = 'Named')]
param(
# The registry path to the key.
[Parameter(Mandatory, ParameterSetName = 'Named')]
[Parameter(Mandatory, ParameterSetName = 'Default')]
[String]$Path,
# The name of the registry value.
@homotechsual
homotechsual / Utils.Registry.ShouldBe.ps1
Last active January 30, 2025 16:07
Utils.Registry.ShouldBe.ps1
# Utility Function: Registry.ShouldBe
## This function is used to ensure that a registry value exists and is set to a specific value.
function Registry.ShouldBe {
[CmdletBinding(DefaultParameterSetName = 'Named')]
param(
# The registry path to the key.
[Parameter(Mandatory, ParameterSetName = 'Named')]
[Parameter(Mandatory, ParameterSetName = 'Default')]
[String]$Path,
# The name of the registry value.
----------------------------------------------------------------------------
CrystalDiskInfo 9.2.1 (C) 2008-2023 hiyohiyo
Crystal Dew World: https://crystalmark.info/
----------------------------------------------------------------------------
OS : Windows 11 Professional [10.0 Build 22631] (x64)
Date : 2023/12/06 21:11:15
-- Controller Map ----------------------------------------------------------
+ Standard SATA AHCI Controller [ATA]
@homotechsual
homotechsual / ModuleName.help.tests.ps1
Created November 20, 2023 10:17
PowerShell Module Help Tests
<#
.SYNOPSIS
Help test suite for the NinjaOne module.
#>
$ModuleName = Get-ChildItem -Path '.\Source' -Filter '*.psd1' | Select-Object -ExpandProperty BaseName
BeforeAll {
$ModuleName = Get-ChildItem -Path '.\Source' -Filter '*.psd1' | Select-Object -ExpandProperty BaseName
$ManifestPath = Get-ChildItem -Path '.\Source' -Filter '*.psd1' | Select-Object -ExpandProperty FullName
if (Get-Module -Name $ModuleName) {
Remove-Module $ModuleName -Force
@homotechsual
homotechsual / docusaurus.config.ts
Created November 3, 2023 12:08
Docusaurus multi-plugin config example
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
import {themes as prismThemes} from 'prism-react-renderer';
const lightCodeTheme = prismThemes.vsLight;
const darkCodeTheme = prismThemes.vsDark;
const admonitionsConfig = {
admonitions: {
keywords: [
@homotechsual
homotechsual / gist:2c5ff61afc387807261fd7fad01051c4
Last active December 30, 2022 17:06
NinjaOne 3PP 28/11/2022
Current Products Supported:
Manufacturer Software Supports Install
Adobe Systems, Inc AIR Yes
Adobe Systems, Inc Acrobat No
Adobe Systems, Inc Bridge No
Adobe Systems, Inc Digital Editions No
Adobe Systems, Inc Flash Player Yes
Adobe Systems, Inc Flash Player (ESR) No
Adobe Systems, Inc Reader Yes
Adobe Systems, Inc RoboHelp No
#Requires -Version 7
function Invoke-HaloBatchProcessor {
<#
.SYNOPSIS
Handles batch processing Halo API requests using PowerShell parallel processing.
.DESCRIPTION
Utility function to batch process Halo API requests supports configurable batch sizes and delays.
.OUTPUTS
Outputs an object containing the response(s) from the web request.
#>
<#
.SYNOPSIS
Based on the PowerShell Script Analyzer (PSSA) presets.
.LINK
https://github.com/PowerShell/PSScriptAnalyzer/blob/master/Engine/Settings/
#>
@{
Severity = @(
'Error',
'Warning',
Admins are intermittently unable to deploy Windows Autopilot devices
IT431147, Last updated: September 26, 2022 5:49 PM
Estimated start time: September 15, 2022 4:53 PM
Affected services
Microsoft Intune
Issue type
Advisory
Issue origin
Microsoft
Status