Skip to content

Instantly share code, notes, and snippets.

<#
.SYNOPSIS
Update your desktop wallpaper from Windows Spotlight using PowerShell
.NOTES
Author: Shannon Graybrook
Github: github.com/realslacker
#>
#requires -version 5.1
@MyITGuy
MyITGuy / file01.ps1
Created November 18, 2016 20:20
PowerShell: Last time Group Policy was processed
# Get StartTimeHi Int32 value
$startTimeHi = (Get-ItemProperty -Path "Registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Extension-List\{00000000-0000-0000-0000-000000000000}").startTimeHi
# Get StartTimeLo Int32 value
$startTimeLo = (Get-ItemProperty -Path "Registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Extension-List\{00000000-0000-0000-0000-000000000000}").startTimeLo
# Convert from FileTime
[datetime]::FromFileTime(([Int64] $startTimeHi -shl 32) -bor $startTimeLo)
<# One-liner #>
[datetime]::FromFileTime(([Int64] ((Get-ItemProperty -Path "Registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Extension-List\{00000000-0000-0000-0000-000000000000}").startTimeHi) -shl 32) -bor ((Get-ItemProperty -Path "Registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Extension-List\{00000000-0000-0000-0000-000000000000}").startTimeLo))
@jhorsman
jhorsman / Cisco_Anyconnect.ps1
Created January 6, 2015 10:11
PowerShell to automate VPN connection with Cisco AnyConnect Secure Mobility Client
#Source www.cze.cz
#This script is tested with "Cisco AnyConnect Secure Mobility Client version 3.1.00495"
# Usage: & '.\Cisco_Anyconnect.ps1' [-Server <server name or ip>] [-Group <group>] [-User <user>] [-Password <password>]
#Please change following variables
#IP address or host name of cisco vpn, Username, Group and Password as parameters
param (
[string]$Server = $( Read-Host "Input server, please" ),
@rxaviers
rxaviers / gist:7360908
Last active April 16, 2024 19:22
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: