Skip to content

Instantly share code, notes, and snippets.

View ctmcisco's full-sized avatar
🏠
Working from home

Francisco Navarro ctmcisco

🏠
Working from home
View GitHub Profile
#Requires -RunAsAdministrator
#Requires -Modules 'Hyper-V'
# Once this has been run once, you will be able to use the Invokle-ShrinkFslDisk tool to get max shrink from all disks, without having to copy.
# Required Services = 'defragsvc', 'vds', 'smphost' ! This script will fail if you don't have these services running !
# Change the source and target path as needed
# Run from a VM with FSLogix installed
# Does not need to be run on a FileServer
@alexellis
alexellis / GUIDE.md
Last active July 31, 2023 10:51
Equinix Metal is my computer

From my blog post: The Internet is my computer

Equinix Metal is my computer

Run hosted VSCode on Equinix Metal's huge: AMD Epyc instances with 64GB RAM and 24 Cores, coupled with a bonded 2 x 10 Gbps uplink to the Internet.

Hosted VSCode

  • Provision your Ubuntu 20.04 LTS server using the dashboard and add your SSH key
  • Once you have the public IP, log in over SSH
@sandeep-sr
sandeep-sr / powershell_SCCM_client_status_version.ps1
Created June 3, 2021 15:36
powershell - script to check SCCM client status,version & sitecode
<#
.Synopsis
This script will check SCCM client status,version & sitecode.
If the site code is not cloudwiki1 it will assign/change to cloudwiki1
#>
Start-Transcript c:\temp\versionlog.txt
$r="Running"
@jdhitsolutions
jdhitsolutions / Get-PSProcess.ps1
Last active November 10, 2023 15:40
Get all PowerShell or pwsh processes running on your computer.
#requires -version 5.1
#requires -module CIMCmdlets
Function Get-PSPowerShell {
<#
.Synopsis
Get all PowerShell processes.
.Description
Get all PowerShell or pwsh processes on your computer. The command will default
to the same PowerShell process as your console, but you can specify either one.
@steviecoaster
steviecoaster / ChocoAudit.ps1
Created March 9, 2021 19:39
Chocolatey Package Audit Report
choco list -lo --audit -r |
ConvertFrom-Csv -Delimiter '|' -Header Package,Version,InstalledBy,Domain,RequestedBy,InstallDate |
Select Package, Version,
@{Name='InstalledBy';Expression={$_.InstalledBy -replace ('User:','')}},
@{Name='Domain';Expression={$_.Domain -replace ('Domain:','')}},
@{Name='RequestedBy';Expression={$_.RequestedBy -replace ('Original User:','')}},
@{Name='InstallDate';Expression={$_.InstallDate -replace ('InstallDateUtc:','')}} |
ConvertTo-Html -Title "Chocolatey Package Audit" -PreContent "Machine: $env:COMPUTERNAME" > C:\temp\audit.htm
@jshelbyjr
jshelbyjr / BoxStarter.TXT
Last active September 9, 2021 03:47
BoxStarter-Reset
# Install Chocolatey
# Install Boxstarter with . { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; Get-Boxstarter -Force
# Install-BoxstarterPackage -PackageName '<Raw gist url>' -DisableReboots Credential $cred
# Allow unattended reboots
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false
$Boxstarter.AutoLogin=$false
#Setup Env
@jborean93
jborean93 / Get-ServiceCertStore.ps1
Created March 2, 2021 04:42
Opens an X509 store for an NT Service account
# Copyright: (c) 2021, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Get-ServiceCertStore {
<#
.SYNOPSIS
Open an X509 store to a service account.
.DESCRIPTION
Opens an X509 store to the NT SERVICE account specified. The X509 store can be used to then add/remove/enumerate
# Get all Application Log Events that are "Error" level and
# save to an xml file (deserialize)
$filter = @{LogName="Application"; Level=2}
Get-WinEvent -Filterhashtable $filter |
Export-CliXml -Path "$ENV:USERPROFILE\application_errors.xml"
@JustinGrote
JustinGrote / .gitignore
Last active February 22, 2021 23:00
Configure a Managed Services Identity for O365 Services
TestExplorerResults.xml