Skip to content

Instantly share code, notes, and snippets.

Function Get-XMLdocument
{
[CmdletBinding()]
Param()
$f = $MyInvocation.InvocationName
Write-Verbose -Message "$f - START"
$data = @"
<xml version="1.0" encoding="UTF-8">
<SillySystem>
function Export-Object
{
[cmdletbinding()]
Param(
[Parameter(Mandatory)]
[string]$xPath
,
[pscredential]$Credential
,
[string]$Uri
function Import-Object
{
[cmdletbinding()]
Param(
[Parameter(Mandatory)]
[Hashtable]$KeyValue
,
[pscredential]$Credential
,
[string]$Uri
configuration Telnet
{
Param(
[String[]]$Computername
)
Foreach ($computer in $computername)
{
Node "$computer"
{
WindowsFeature TelnetClient
function Get-PowershellProcess
{
[cmdletbinding()]
Param(
$ProcessName = "Powershell"
)
Write-Information -MessageData "this is info data" -Tags GetPowershellprocess
Get-Process -Name $ProcessName
}
function Get-PowershellProcess
{
[cmdletbinding()]
Param(
$ProcessName = "Powershell"
)
Write-Information -MessageData "this is info data" -Tags GetPowershellprocess
Get-Process -Name $ProcessName
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
([System.Linq.Enumerable]::Range([char]"a",26) |
foreach {
[System.Convert]::ToString([char][int]$_)
}) -join ""
$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
function Test-Logging
{
[cmdletbinding()]
Param(
[string]$Name
)
$f = $MyInvocation.InvocationName
Write-Verbose -Message "$f - START"