This file contains 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
#Requires -Module PSSQLite | |
param( | |
[Alias('Name', '')] | |
[string] | |
$ProfileName | |
) | |
<# | |
Updated for 9/2 patch | |
Updated by request of Truth91 | |
#> |
This file contains 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
Import-Module -Name UniversalDashboard | |
$ADDomain = "MyDomainHere.consto.com" | |
$ADGroup = "GroupNameHere" | |
$PageHome = New-UDPage -Name "Home" -Content { | |
New-UDLayout -Columns 3 -Content { | |
New-UDCard -Title "Scheduled" -Content { | |
"Links" | |
} -Links @( |
This file contains 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
{ | |
"Dynamic_Param_Start": { | |
"prefix": "dynamic1start", | |
"body": [ | |
"DynamicParam {", | |
"\t${1:dynamic2p}${2:}", | |
"}" | |
], | |
"description": "An empty dynamic parameter" | |
}, |
This file contains 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
. .\NewXMLDocument.ps1 | |
$rdp_domainname = "MicrosoftAccount" | |
$rdp_username = "fred" | |
$ssh_username = "fred" | |
$vnc_username = "fred" | |
$rdp_password = "changeme!" | |
$ssh_password = "changeme!" | |
$vnc_password = "changeme!" |
This file contains 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 Get-ConfigData { | |
Param( | |
$Path = "$env:TEMP\MyScriptDefaultCredStore.config.clixml" | |
) | |
if (Test-Path -Path $Path) { | |
# Open Config file if exists | |
$ConfigData = Import-Clixml $Path | |
} | |
else { | |
# Create Config file if does not exists |
This file contains 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 the asterisk-extra-sounds-en-wav-current.tar.gz file or the one for your language | |
# Extract to a folder, example C:\Temp\asterisk-extra-sounds-en-wav-1.5\ | |
$AsteriskAudioFolder = "C:\Temp\asterisk-extra-sounds-en-wav-1.5\" | |
function Out-Audio { | |
[CmdletBinding()] | |
param ( | |
[string[]] | |
$FilePath | |
) |
This file contains 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
$Users = Get-ADUser | |
$GroupData = Import-Clixml -Path ".\Groups.clixml" | |
$GroupsToAdd = $Users | ForEach-Object { | |
$User = $_ | |
$Company = $GroupData.Companies | Where-Object {$_.Name -eq $User.Company} | |
$Departments = $Company.Departments | Where-Object {$_.Name -eq $User.Department} | |
$Departments.Groups | |
} |
This file contains 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
# From https://communary.net/2014/12/21/show-calendar-cal-for-powershell/ | |
function Show-Calendar { | |
<# | |
.SYNOPSIS | |
Show calendar. | |
.DESCRIPTION | |
This function is a PowerShell version of the *NIX cal command and will show a | |
calendar of the chosen month(s). The current day will be marked with a '*'. | |
For best results, use together with the FormatPx module by Kirk Munro. |
This file contains 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
apt install libcgi-emulate-psgi-perl libapache-session-perl libcrypt-eksblowfish-perl libconvert-color-perl libcgi-psgi-perl libcss-minifier-xs-perl libcss-squish-perl libdata-guid-perl libdata-ical-perl libbusiness-hours-perl libdate-manip-perl libdatetime-format-natural-perl libdatetime-locale-perl libdatetime-perl libdata-page-pageset-perl libdate-extract-perl libdbi-perl libdbix-searchbuilder-perl libdevel-globaldestruction-perl libdevel-stacktrace-perl libemail-address-list-perl libemail-address-perl libcrypt-ssleay-perl libdbd-mysql-perl libcrypt-x509-perl libfcgi-perl libfile-sharedir-perl libfile-which-perl libgd-graph-perl libgd-perl libgd-text-perl libgnupg-interface-perl libgraphviz-perl libhtml-formattext-withlinks-andtables-perl libhtml-formattext-withlinks-perl libhtml-mason-perl libhtml-mason-psgihandler-perl libhtml-quoted-perl libhtml-rewriteattributes-perl libhtml-scrubber-perl libhttp-message-perl libipc-run3-perl libipc-run-perl libjavascript-minifier-xs-perl libjson-perl liblocale-maketex |
This file contains 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
# Run this script to see connected hard disk status with nifty bar graph! | |
$myDisk = Get-WmiObject -class win32_logicaldisk | |
$myDisk | ForEach-Object { | |
$free = ($_.freespace) | |
$total = ($_.size) | |
$used = $total - $free | |
$perUsed = ($used / $total) * 100 | |
$perFree = ($free / $total) * 100 | |
$t = [math]::Round($total / 1gb) | |
$f = [math]::Round($free / 1gb) |