Skip to content

Instantly share code, notes, and snippets.


Stephen Owen 1RedOne

View GitHub Profile
1RedOne / Update-SubLibVm.ps1
Created Apr 19, 2022
A script to update sublib VMs
View Update-SubLibVm.ps1
Import-Module Az.Accounts
Import-Module Az.Automation
Import-Module Az.Compute
A runbook to iterate through VMs in this Sublib and tell them to patch, if they don't have a 'DontPatch' tag
AUTHOR: Stephen Owen
1RedOne / Get-OfficeFileInfo.ps1
Created Jul 21, 2021
Get Office File Info In PowerShell
View Get-OfficeFileInfo.ps1
function Get-OfficeFileInfo($filePath){
if ($filePath -like "*.doc*"){
Get-WordFileInfo $filePath
Get-ExcelFileInfo $filePath
1RedOne / ConvertTo-StringData.ps1
Last active Jun 30, 2021
ConvertTo-StringData - Converting a complex object into StringData
View ConvertTo-StringData.ps1
Function ConvertTo-StringData($object, $propertyOverride){
$fields = $object | get-member -MemberType NoteProperty
foreach($field in $fields){
if (IsArray($field)){
OutputArrayMember -object $object -field $field
OutputMember -object $object -propertyName $ -propertyOverride $propertyOverride
1RedOne / NewUserUI.ps1
Created Mar 26, 2021
Stack Answer 66817943
View NewUserUI.ps1
##Setting Static Information
$primaryTelexNumber = "1"
$telexNumber = "7"
##Get Users First Name
[string] [Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$title = "AD New User Script: First Name"
$msg = "Please Enter the new User's First Name"
$FirstName = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
1RedOne / githubLink.html
Created Mar 18, 2021
Github Report Issue Link
View githubLink.html
1RedOne / exampleGitHublink.txt
Last active Mar 17, 2021
Github Markdown Button Syntax
View exampleGitHublink.txt
1RedOne / SetupDC.ps1
Created Mar 16, 2021
Complete One Page DSC Domain Controller Setup
View SetupDC.ps1
$secpasswd = ConvertTo-SecureString 'IWouldLiketoRecoverPlease1!' -AsPlainText -Force
$SafeModePW = New-Object System.Management.Automation.PSCredential ('guest', $secpasswd)
$secpasswd = ConvertTo-SecureString 'IveGot$kills!' -AsPlainText -Force
$localuser = New-Object System.Management.Automation.PSCredential ('guest', $secpasswd)
configuration TestLab
1RedOne / Readme.Md
Created Jan 25, 2021
Why ARC Matters
View Readme.Md

Ancient History

The world's most popular platform to manage giant ass windows envrionments is made by microsoft, it's called System Center Configuration Manager.  Now called MEMCM, Microsoft Endpoint. 

Before I became a dev I was a consultant setting up ConfigMgr for big companies for years.

This was good but was mostly built for managing devices the company owns, it didn't really support managing devices the user brought in, like a personal cell phone or personal laptop scenario.

So Microsoft made a new product that can handle that scenario, like how we joined Azure AD on our laptops to set them up. that's called MDM management. It uses a different channel to configure devices than SCCM did.

1RedOne /
Created Jan 11, 2021
Biden Tax Change Summary

Biden will change taxes in these ways

  1. Income tax changes.
	Previous	Trump		Biden proposal
  50 k 	25%		22%
 500 k  39.6%		35%		39.6%
5000 k  39.6&		37%		39.6%

These are marginal tax rates. If you don't understand that, look it up.

1RedOne /
Last active Jan 6, 2021
Numbers on Trump Jobs and Tax Cut versus HR 133 Stimulus


The Senate Signed the Consolidated Appropriations Act, 2021 on December 21st.

This bill allocated $166B in direct stimulus in the form of $600 checks.

$priceTag = $166,000,000,000

To determine the average number of checks, let $recipients be defined as follows.