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
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
$a = [xml]($rss.downloadstring("http://channel9.msdn.com/Events/SharePoint-Conference/2014/RSS/mp4high")) | |
$a.rss.channel.item | foreach { | |
$code = $_.comments.split("/") | select -last 1 | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $code + "-" + $_.creator + "-" + $_.title.Replace("'","").Replace("*","").Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "") |
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 http://blogs.technet.com/b/heyscriptingguy/archive/2014/10/25/powertip-test-connectivity-to-remote-servers-without-ping.aspx | |
# Test a server for connectivity without PING | |
's1','s2' | % {Test-Wsman $_} |
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-BitsTransfer | Select-Object -Property *,@{ Name = 'PercentComplete'; Expression = { '{0:P}' -f ($PSItem.BytesTransferred/$PSItem.BytesTotal); }; }; |
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 AWSPowerShell | |
Function Get-EC2LatestWindowsServerAMI | |
{ | |
return Get-EC2Image | ? { $_.Platform -eq "Windows" -and $_.ImageOwnerAlias -eq "amazon" -and $_.Name -like "*Windows*Server*2012*R2*English*Base*" } | Sort-Object -Property CreationDate -Descending | Select-Object -First 1 | |
} |
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-EC2ImageByName windows_2012r2_base | Select-Object -First 1 |
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 azrdp { | |
<# | |
.Author | |
Trevor Sullivan <pcgeek86@gmail.com> | |
.Description | |
Invoke a RDP session to an Azure Virtual Machine, without having to type the | |
Cloud Service name or Virtual Machine name. | |
.Outputs |
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
#!/bin/bash | |
# Encode a WAV to a finalized podcast MP3 with metadata, in the current directory | |
# Requires lame | |
# With Homebrew on Mac OS X: brew install lame | |
SHOW_AUTHOR="ATP" | |
EPISODE_NUMBER=104 | |
EPISODE_TITLE="Minutiæ" |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"draw_white_space": "selection", | |
"ensure_newline_at_eof_on_save": true, | |
"fade_fold_buttons": false, | |
"font_face": "Input Mono Narrow", | |
"font_size": 16, | |
"gutter": true, | |
"highlight_line": true, |
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-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " - " + $_.disksizerequired/1024/1024} {Write-Host "`nTotal Storage (in MB) =" ("{0:n0}" -f ($db/1024/1024))} | Out-File c:\temp\spdatabasesizes.txt |
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
with fs | |
as | |
( | |
select database_id, type, size * 8.0 / 1024 size | |
from sys.master_files | |
) | |
select | |
name, | |
(select sum(size) from fs where type = 0 and fs.database_id = db.database_id) DataFileSizeMB, | |
(select sum(size) from fs where type = 1 and fs.database_id = db.database_id) LogFileSizeMB |
OlderNewer