Skip to content

Instantly share code, notes, and snippets.

View krzydoug's full-sized avatar

Doug Maurer krzydoug

  • Software Consulting Services
View GitHub Profile
@krzydoug
krzydoug / Export-OutlookSharedCalendar.ps1
Last active October 19, 2021 12:46
Export-OutlookSharedCalendar - a powershell function to export shared calendars
Function Export-OutlookSharedCalendar{
<#
.Synopsis
Allows a user to export a shared calendar from their outlook.
.DESCRIPTION
Allows a user to export a shared calendar from their outlook.
.NOTES
Name: Export-OutlookSharedCalendar.ps1
@krzydoug
krzydoug / Get-InstalledPrograms.ps1
Last active May 8, 2020 00:06
Get-InstalledPrograms.ps1
Function Get-InstalledPrograms{
<#
.Synopsis
Get a list of installed programs from local or remote computers.
.DESCRIPTION
Get a list of installed programs from local or remote computers. Will pull list from both 32 and 64bit hives (not a complete and accurate list)
.NOTES
Name: Get-InstalledPrograms.ps1
$ErrorActionPreference = 'stop'
Clear-Host
"============================================ Drivenotfoundexception ============================================="
try {
Get-Childit
}
# remove the 1st "#" below to disable the 1st catch
#<#
catch [System.Management.Automation.Drivenotfoundexception]
# Define the functions
function RevokeRefreshToken
{
$azureADConnected = ConnectToAzureAD
if($azureADConnected -eq $true)
{
$userInput = Read-Host "Press 1 to specify csv file or enter an email address of a specific user"
if($userInput.Equals("1"))
{
Param($one,$two)
write-host $one
write-host $two
Function Get-MailTrafficReport
{
Param
(
[Parameter(Mandatory = $false)]
[switch]$MFA,
[switch]$OnlyOrganizationUsers,
[Nullable[DateTime]]$StartDate,
[Nullable[DateTime]]$EndDate,
[string]$UserName,
$searchterm = 'intel'
$newmac = 'A0B1C2D3E4F5'
$path = 'HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}'
Push-Location $path
$nic = Get-ChildItem -ea SilentlyContinue | Get-ItemProperty | where driverdesc -like "*$searchterm*"
switch($nic.pspath.count)
Function Get-FileMetaData {
[cmdletbinding()]
Param
(
[parameter(valuefrompipeline,ValueFromPipelineByPropertyName,Position=1,Mandatory)]
$InputObject
)
begin
{
#initialize
Set-ExecutionPolicy Bypass -Scope CurrentUser -Force
$global:percentcomplete = 0
$global:activity = 'Initializing..'
function write-message{
Param($msg)
Write-Progress -Activity $Global:activity -Status "$msg..." -PercentComplete $global:percentcomplete
}
write-message "Symantec network uninstall script initializing.."
. \\dcserver\Support\Scripts\Get-InstalledPrograms.ps1
This file has been truncated, but you can view the full file.
Function Invoke-Log4jScan {
[cmdletbinding()]
Param(
[string[]]$ComputerName
)
begin {
Write-Verbose "Invoke-Log4jScan initializing"
if(-not (Test-Path C:\Temp)){