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
Install-Module -Name Az -AllowClobber -Scope CurrentUser | |
Import-Module Az | |
Connect-AzAccount |
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
vpncfg { | |
connections { | |
enabled = yes; | |
conn_type = conntype_lan; | |
name = "AzureToFritzBoxVPN"; | |
always_renew = no; | |
reject_not_encrypted = no; | |
dont_filter_netbios = yes; | |
localip = 0.0.0.0; | |
local_virtualip = 0.0.0.0; |
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
New-AzLocalNetworkGateway -Name AzureToFritzBoxVPN-LNG -ResourceGroupName AzureToFritzBoxVPN-RG -Location "West Europe" -fqdn "argq6adasd23ruo.myfritz.net" -AddressPrefix "10.1.1.0/24" |
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
Stop-Service SCVMMService | |
Stop-Service SCVMMAgent | |
C:\temp\kb5019202_vmmserver_amd64.msp | |
C:\temp\kb5019203_AdminConsole_amd64.msp | |
(Get-Item "C:\Program Files\Microsoft System Center\Virtual Machine Manager\bin\vmmservice.exe").VersionInfo |
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
$fsrm = New-Object -ComObject "Fsrm.FsrmReportManager" | |
enum FsrmReportLimit { | |
MaxFiles = 1 | |
MaxFileGroups = 2 | |
MaxOwners = 3 | |
MaxFilesPerFileGroup = 4 | |
MaxFilesPerOwner = 5 | |
MaxFilesPerDuplGroup = 6 | |
MaxDuplicateGroups = 7 |
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
Install-Module -Name PSPKI | |
Import-Module -Name PSPKI | |
$cert = @(Get-ChildItem cert:\LocalMachine\My | Where-Object {$_.Subject -like "*CertificateSubject*"})[0] | |
Convert-PfxToPem -Certificate $cert -OutputFile "c:\temp\output.pem" |
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
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store "My","LocalMachine" | |
$store.Open(9) #ReadWrite + IncludeArchived | |
$store.Certificates |? Archived -eq $true | |
$store.Certificates |? Archived -eq $true |% {$_.Archived = $false} #Unarchive all certificates | |
$store.Certificates |? Subject -eq "CN=archivedcert" |% {$_.Archived = $false} #Unarchive certificates with given subject | |
$store.Close() |
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
Get-SCVirtualDVDDrive -All | Where-Object {$_.Connection -ne 'None' -and $_.Connection -ne $null} | Set-SCVirtualDVDDrive -NoMedia |
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
tzutil /s "W. Europe Standard Time" |
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
Get-SCVirtualMachine | Foreach-Object { | |
$vm = $_; | |
$dvd = Get-SCVirtualDVDDrive -VM $vm; | |
if ($dvd.Connection -ne 'None' -and $dvd.Connection -ne $null) { | |
Set-SCVirtualDVDDrive -VirtualDVDDrive $dvd -NoMedia | |
} | |
} |
NewerOlder