This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Require -Version 5.0 | |
| # using statement must appear before any other statements in a script. | |
| # other using types(Assembly/Command/Module/Type) is not supported yet? | |
| # [Enum]::GetNames('System.Management.Automation.Language.UsingStatementKind') | |
| using namespace System.Diagnostics | |
| using namespace System.Linq | |
| function Main | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ErrorActionPreference = "Stop" | |
| $notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString() | |
| [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null | |
| $template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01) | |
| #Convert to .NET type for XML manipuration | |
| $toastXml = [xml] $template.GetXml() | |
| $toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @powershell -NoProfile -ExecutionPolicy Unrestricted "%~dp0\desktopsmallicon.ps1" %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| using UnityEngine; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| using UnityEditor.Callbacks; | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| get-date -for "yyyy-MM-dd HH:mm:ss.fffffff" | |
| 2015-05-30 17:07:25.2352256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 0. Requires steamcmd. Download from https://developer.valvesoftware.com/wiki/SteamCMD. Put it in your steam directory (the one with steam.exe) | |
| # 1. Save this script by right-click on Raw button and choose "Save link as..." | |
| # 2. Start powershell : right click "Start" then choose "Run..." & type : powershell | |
| # 3. Run script type : Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Unrestricted -NoExit -file `"$Home\Downloads\SteamShortcutCreator.ps1`""; exit | |
| # 4. Give permission in pop-up | |
| [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
| $steamDir = if (Test-Path "C:\Program Files (x86)\Steam\steam.exe") { "C:\Program Files (x86)\Steam" } | |
| elseif ($args[0] -and (Test-Path "$($args[0])\steam.exe")) { $args[0] } | |
| elseif (Test-Path "$PSScriptRoot\steam.exe") { $PSScriptRoot } | |
| elseif (Test-Path ".\steam.exe") { "." } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ____ | |
| # / __ \________ ________ ____ ______ | |
| # / /_/ / ___/ _ \/ ___/ _ \/ __ `/ ___/ | |
| # / ____/ / / __/ / / __/ /_/ (__ ) | |
| #/_/ /_/ \___/_/ \___/\__, /____/ | |
| # /_/ | |
| # this script will automatically pull font awesome files from github via .net framework "WebClient" | |
| # install fantastically handy ImageMagick tool from => http://www.imagemagick.org/script/binary-releases.php | |
| # and add it to your path | |
| if (-not [bool](Get-Command "magick.exe" -ErrorAction SilentlyContinue)) { throw "Magick.exe not in path" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function | |
| Convert-WindowsImage | |
| { | |
| <# | |
| .NOTES | |
| Copyright (c) Microsoft Corporation. All rights reserved. | |
| Use of this sample source code is subject to the terms of the Microsoft | |
| license agreement under which you licensed this sample source code. If |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Safely Imports Hyper-V Virtual Machines that were exported | |
| as configuration only, without State Data (snapshots, VHDs, etc). | |
| .DESCRIPTION | |
| Hyper-V 2008 R2 removed the option to export a Virtual Machine without | |
| its State Data (Snapshots, Virtual Disk Images (VHDs), Suspend State), | |
| as configuration only through the GUI. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $User = Read-Host -Prompt "Input your username" | |
| # Install Chocolatey | |
| Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).Downloa | |
| dString('https://chocolatey.org/install.ps1')) | |
| # | |
| # Install Programs | |
| # | |
| choco install jre8 -y |