Skip to content

Instantly share code, notes, and snippets.

$source_path="C:\USB" #Change the path of source image file folder
$dest_path="D:\Wallpaper" #Change the path to shared folder where client can update wallpaper
$filename_fix="background.png" # File name defaut in GPO
# Save pictures to the correct directory
if( -Not (Test-Path -Path $dest_path ) )
{
New-Item -ItemType directory -Path $dest_path
Copy-Item "$source_path\photo1.png*" -Destination $dest_path
@CloudHoang
CloudHoang / ipsec-monitor.sh
Created July 14, 2018 03:57 — forked from winhamwr/ipsec-monitor.sh
Script to check the status of ipsec tunnels and refresh them if they're down. This should be run from cron every minute. To add monitoring on a tunnel, add a commented-out `monitor` line with the IP and port to use for establishing connection status. eg. `#monitor 172.17.105.80 9898` Adapted from a script posted by user "c b" on Strongswan [issu…
#!/bin/bash
function main()
{
monitor_from_file $*
}
function monitor_vpn_ip_port()
{
local CONN_NAME=$1