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-ConfigurationDataAsObject | |
| { | |
| [CmdletBinding()] | |
| Param ( | |
| [Parameter(Mandatory)] | |
| [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformation()] | |
| [hashtable] $ConfigurationData | |
| ) | |
| return $ConfigurationData | |
| } |
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 ( | |
| [Parameter()] | |
| [ValidateSet('VMM','OM','DPM','SCORH','SM','All')] | |
| [String] $Component = 'All', | |
| [Parameter()] | |
| [String] $Destination = $env:TEMP | |
| ) | |
| Begin { |
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
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "storageAccountName": { | |
| "type": "string", | |
| "defaultValue": "MyARMDemo", | |
| "minLength": 3, | |
| "maxLength": 24, | |
| "metadata": { |
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-AvailableIPv4Address { | |
| param ( | |
| [System.Collections.ArrayList] $IPRange | |
| ) | |
| $MaxThreads = 30 | |
| $ScriptBlock = { | |
| Param ( | |
| [String]$IPAddress | |
| ) |
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
| #Download the module from http://en.community.dell.com/techcenter/systems-management/w/wiki/7727.powershell-cmdlets-for-poweredge-servers | |
| Import-Module DellPEPowerShellTools | |
| $idracSession = New-PEDRACSession -Credential (Get-Credential) -IPAddress 192.168.100.1 | |
| $NicView = Get-CimInstance -ResourceUri 'http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_NICView' -Namespace root\dcim -CimSession $idracSession | |
| $NicView | Select DeviceDescription, DeviceNumber, EFIVersion, MediaType |
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
| $GetTargetResource = @' | |
| #TODO - Add the logic for Get-TagetResource | |
| #TODO - Always return a hashtable from this function | |
| #TODO - Remove $Ensure if it is not required | |
| function Get-TargetResource | |
| { | |
| [OutputType([Hashtable])] | |
| param ( | |
| [Parameter()] | |
| [ValidateSet('Present','Absent')] |
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-AzureStatus { | |
| $response = Invoke-RestMethod -Uri 'http://azure.microsoft.com/en-us/status/feed/' | |
| if ($response) { | |
| foreach ($item in $response) { | |
| Write-Host "$($item.Title) : " -NoNewline | |
| Write-Host -ForegroundColor Red "$($item.Description)" | |
| } | |
| } else { | |
| Write-Host -ForegroundColor Green "All is well!" | |
| } |
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 Reset-AzureVMUserPassword { | |
| param ( | |
| [String] | |
| $VMName, | |
| [String] | |
| $ServiceName, | |
| [PSCredential] | |
| $Credential |
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 Open-FWLink { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| $LinkID | |
| ) | |
| Start-Process "http://go.microsoft.com/fwlink/?LinkID=${LinkID}" | |
| } |
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 Test-Url { | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)] | |
| [String] $Url | |
| ) | |
| Process { | |
| if ([system.uri]::IsWellFormedUriString($Url,[System.UriKind]::Absolute)) { | |
| $true |