Skip to content

Instantly share code, notes, and snippets.

@davehull
davehull / Resolve-KnownFolderGUID
Last active January 30, 2024 10:16
Need to resolve a Windows "known folder guid" to it's human-readable value?
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=0)]
[String]$GUID
)
function Resolve-KnownFolderGuid {
Param(
[Parameter(Mandatory=$True,Position=0)]
[String]$GUID
@jeffbryner
jeffbryner / gist:8412843
Last active January 3, 2016 04:59
UTC date from anything
from datetime import datetime
from dateutil.parser import parse
import pytz
def toUTC(suspectedDate,localTimeZone="US/Pacific"):
'''make a UTC date out of almost anything'''
utc=pytz.UTC
objDate=None
if type(suspectedDate)==str: