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
param | |
( | |
[string]$PathToModule='C:\temp\Cos.psm1', | |
[string]$ModuleName = 'cos', | |
[string]$OutputFolderPath='C:\temp', | |
[string]$ResultFileNamePrefix='cos_module', | |
[string]$ResultFileNameSuffix = 'md' | |
) | |
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
# +----------------------------------------------------------------------------+ | |
# | File : StoreCredentials.ps1 | | |
# | Author : Eugène Dauphin | | |
# | Version : 1.1 | | |
# | Purpose : Connect to an Office 365 PowerShell Connection | | |
# | | | |
# | Synopsis: | | |
# | Usage : .\Connect.ps1 .\FolderNameOfConnection | | |
# +----------------------------------------------------------------------------+ | |
# | Maintenance History | |
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: | | |
# | Usage : .\StoreCredentials.ps1 .\FolderNameOfConnection | | |
# +----------------------------------------------------------------------------+ | |
# | Maintenance History | | |
# | ------------------- | | |
# | Name Date Version Description | | |
# | ---------------------------------------------------------------------------+ | |
# | Eugène Dauphin 18-09-2014 1.0 Initial Version | | |
# | Eugène Dauphin 26-08-2015 1.1 Force switch and dir create added | |
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
foreach ($command in ('Get-WmiObject','Get-CimInstance')){ | |
$Metadata = New-Object System.Management.Automation.CommandMetaData (Get-Command $command) | |
$proxyCmd = [System.Management.Automation.ProxyCommand]::Create($Metadata) #| clip | |
if ($command -eq 'Get-WmiObject'){ | |
$newParam = @' | |
[Parameter(ParameterSetName='query')] | |
[ScriptBlock] | |
$PowerShellFilter, | |
'@ | |
} |
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
Set-StrictMode -Version 2.0 | |
function Get-SqlDataScript { | |
param( | |
[Parameter(Mandatory, Position = 0)] | |
[string] $ServerName, | |
[Parameter(Mandatory, Position = 1)] | |
[string] $InstanceName, |
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
#requires -version 4.0 | |
Function Out-More { | |
<# | |
.Synopsis | |
Send "pages" of objects to the pipeline. | |
.Description | |
This function is designed to display groups or "pages" of objects to the PowerShell pipeline. It is modeled after the legacy More.com command line utility. | |
By default the command will write out objects out to the pipeline in groups of 50. You will be prompted after each grouping. Pressing M or Enter will get the next group. Pressing A will stop paging and display all of the remaining objects. Pressing N will display the next object. Press Q to stop writing anything else to the pipeline. |
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 Get-Direction() | |
{ | |
Param( | |
[Parameter(Mandatory=$true,Position=0)] $Origin, | |
[Parameter(Mandatory=$true,Position=1)] $Destination, | |
[Parameter(Position=2)] [ValidateSet('driving','bicycling','walking')] $Mode ="driving", | |
[Switch] $InMiles | |
) | |
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
# SVN Export Script | |
# | |
# Given an SVN URL and local directory path, this script copies all files from | |
# SVN into the specified local directory. | |
# | |
# Uses SharpSVN DLL v1.7002.1998 (Documentation : http://docs.sharpsvn.net/current/) | |
# | |
# Takes two command line arguments, an SVN URL and a local directory path. | |
param ([string]$svnUrl = $(read-host "Please specify the path to SVN"), | |
[string]$svnLocalPath = $(read-host "Please specify the local 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
********************** | |
Windows PowerShell transcript start | |
Start time: 20160220181407 | |
Username: SHODAN\Blade_000 | |
RunAs User: SHODAN\Blade_000 | |
Machine: SHODAN (Microsoft Windows NT 10.0.10586.0) | |
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe | |
Process ID: 9456 | |
PSVersion: 5.0.10586.63 | |
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0.10586.63 |
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
$ConfigData =@{ | |
AllNodes = @( | |
@{ | |
NodeName = "localhost" | |
PSDSCAllowPlainTextPassword = $True | |
} | |
) | |
} |