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(Mandatory=$true)] | |
| [string]$VirtualNetworkName, | |
| [Parameter(Mandatory=$false)] | |
| [string]$SubnetName = '', | |
| [Parameter(Mandatory=$true)] | |
| [string]$Location, | |
| [Parameter(Mandatory=$true)] | |
| [string]$ResourceGroupName |
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(Mandatory=$true)] | |
| [string]$ResourceGroupName, | |
| [Parameter(Mandatory=$false)] | |
| [string]$StorageAccountName, | |
| [Parameter(Mandatory=$true)] | |
| [string]$ContainerName, | |
| [Parameter(Mandatory=$true)] | |
| [string]$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
| Param | |
| ( | |
| [string]$Name | |
| ) | |
| if ($Name) | |
| { | |
| $VM = Get-AzureVM |Where-Object -Property Name -Like $Name |Get-AzureVM -Status |Select-Object -Property Name, ResourceGroupName, Statuses; | |
| $vm.Statuses |ForEach-Object { | |
| New-Object -TypeName psobject -Property @{ | |
| Name = $VM.Name; |
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-Gpo | |
| { | |
| [CmdletBinding()] | |
| Param | |
| ( | |
| [Parameter(Mandatory=$true,Position=0,ParameterSetName="DisplayName")] | |
| [string]$DisplayName, | |
| [Parameter(Mandatory=$true,Position=0,ParameterSetName="Id")] | |
| [string]$Id, | |
| [Parameter(Mandatory=$true,Position=0,ParameterSetName="All")] |
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 New-FirewallRule | |
| { | |
| <# | |
| .SYNOPSIS | |
| Creates a new HFnetCfg.FWRule ComObject | |
| .DESCRIPTION | |
| This function creates a FWRule ComObject that can be added to the firewall. | |
| Each time you change a property of a rule, Windows Firewall commits the rule and verifies it for correctness. | |
| As a result, when you edit a rule, you must perform the steps in a specific order. For example, if you add an ICMP |
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
| $Protocols = "SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols" | |
| $Ciphers = "SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers" | |
| $Hashes = "SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Hashes" | |
| $KeyExchangeAlgorithms = "SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\KeyExchangeAlgorithms" | |
| $CipherOrder = "SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002" | |
| Import-Module C:\projects\mod-posh\powershell\production\includes\RegistryLibrary.psm1 | |
| # | |
| # Disable old SSL | |
| # |
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
| Remove-Variable * | |
| clear | |
| $Mp = New-ManagementPack -ID 'ptech.LegatoNetworker' -Version '1.0.0.57' -Name 'Legato Networker MP' | |
| Add-Reference -ManagementPack $Mp -Reference (New-Reference -ManagementPack $Mp -Alias MSDL -ID Microsoft.SystemCenter.DataWarehouse.Library -Version 6.1.7221.0 -PublicKeyToken 31bf3856ad364e35) | |
| Add-Reference -ManagementPack $Mp -Reference (New-Reference -ManagementPack $Mp -Alias MSIL -ID Microsoft.SystemCenter.InstanceGroup.Library -Version 6.1.7221.0 -PublicKeyToken 31bf3856ad364e35) | |
| Add-Reference -ManagementPack $Mp -Reference (New-Reference -ManagementPack $Mp -Alias SC -ID Microsoft.SystemCenter.Library -Version 6.1.7221.0 -PublicKeyToken 31bf3856ad364e35) | |
| Add-Reference -ManagementPack $Mp -Reference (New-Reference -ManagementPack $Mp -Alias Windows -ID Microsoft.Windows.Library -Version 6.1.7221.0 -PublicKeyToken 31bf3856ad364e35) | |
| Add-Reference -ManagementPack $Mp -Reference (New-Reference -ManagementPack $Mp -Alias System -ID System.Library -Version 6.1.7221.0 -PublicKeyToken |
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 New-ManagementPack | |
| { | |
| [CmdletBinding()] | |
| Param | |
| ( | |
| [string]$ID = 'ptech.LegatoNetworker', | |
| [string]$Version = '1.0.0.57', | |
| [string]$Name = 'Legato Networker MP' | |
| ) | |
| 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
| Function New-XmlDocument | |
| { | |
| [CmdletBinding()] | |
| Param | |
| ( | |
| [string]$Root, | |
| [string[]]$Elements | |
| ) | |
| 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
| Function Get-MofFile | |
| { | |
| [CmdletBinding()] | |
| Param | |
| ( | |
| [string]$Path | |
| ) | |
| Begin | |
| { | |
| $MofFile = Get-Content $Path |