Skip to content

Instantly share code, notes, and snippets.

View AlexSen's full-sized avatar
😏

Alex AlexSen

😏
View GitHub Profile
function Get-FileType {
<#
.SYNOPSIS
Try to get the file type based on it's file signature.
.DESCRIPTION
This function uses Get-FileSignature by Boe Prox and a list of
known file signatures to try to find the file type of a given file.
.EXAMPLE
Get-FileType c:\path\to\file.pdf
.LINK
@AlexSen
AlexSen / Start-FileSystemWatcher.ps1
Created January 8, 2019 15:42 — forked from mobzystems/Start-FileSystemWatcher.ps1
Using a FileSystemWatcher from PowerShell
# Start-FileSystemWatcher.ps1 - File System Watcher in Powershell.
# Brought to you by MOBZystems, Home of Tools
# https://www.mobzystems.com/code/using-a-filesystemwatcher-from-powershell/
[CmdletBinding()]
Param(
# The path to monitor
[Parameter(Mandatory=$true, Position=0)]
[string]$Path,
# Monitor these files (a wildcard)