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-XMLdocument | |
| { | |
| [CmdletBinding()] | |
| Param() | |
| $f = $MyInvocation.InvocationName | |
| Write-Verbose -Message "$f - START" | |
| $data = @" | |
| <xml version="1.0" encoding="UTF-8"> | |
| <SillySystem> |
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 Export-Object | |
| { | |
| [cmdletbinding()] | |
| Param( | |
| [Parameter(Mandatory)] | |
| [string]$xPath | |
| , | |
| [pscredential]$Credential | |
| , | |
| [string]$Uri |
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 Import-Object | |
| { | |
| [cmdletbinding()] | |
| Param( | |
| [Parameter(Mandatory)] | |
| [Hashtable]$KeyValue | |
| , | |
| [pscredential]$Credential | |
| , | |
| [string]$Uri |
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
| configuration Telnet | |
| { | |
| Param( | |
| [String[]]$Computername | |
| ) | |
| Foreach ($computer in $computername) | |
| { | |
| Node "$computer" | |
| { | |
| WindowsFeature TelnetClient |
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-PowershellProcess | |
| { | |
| [cmdletbinding()] | |
| Param( | |
| $ProcessName = "Powershell" | |
| ) | |
| Write-Information -MessageData "this is info data" -Tags GetPowershellprocess | |
| Get-Process -Name $ProcessName | |
| } |
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-PowershellProcess | |
| { | |
| [cmdletbinding()] | |
| Param( | |
| $ProcessName = "Powershell" | |
| ) | |
| Write-Information -MessageData "this is info data" -Tags GetPowershellprocess | |
| Get-Process -Name $ProcessName |
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-PowershellProcess | |
| { | |
| [cmdletbinding()] | |
| Param( | |
| $ProcessName = "Powershell" | |
| ) | |
| Write-Host -Object "I do not care about the puppies" | |
| Write-Information -MessageData "this is info data" -Tags GetPowershellprocess | |
| Get-Process -Name $ProcessName |
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
| ([System.Linq.Enumerable]::Range([char]"a",26) | | |
| foreach { | |
| [System.Convert]::ToString([char][int]$_) | |
| }) -join "" |
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
| $nugetConfig = @' | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <packages> | |
| <package id="WindowsAzure.ServiceBus" version="2.6.7" targetFramework="net45" /> | |
| </packages> | |
| '@ | |
| Set-Content -Path .\packages.config -Value $nugetConfig | |
| $nuget = Get-PackageProvider -Name Nuget -ErrorAction SilentlyContinue -WarningAction SilentlyContinue |
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 Write-Verbose | |
| { | |
| [cmdletbinding()] | |
| Param( | |
| [string]$Message | |
| ) | |
| # Comment the next line to disable logging to file | |
| [string]$LogFilePath = "c:\temp\customlog.txt" | |
| if($LogFilePath) |
OlderNewer