Skip to content

Instantly share code, notes, and snippets.

Pyromania Pyromaniaxxx

  • Japan
Block or report user

Report or block Pyromaniaxxx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Pyromaniaxxx
Pyromaniaxxx / MASTP3-limitbreakscript.ps1
Created Mar 22, 2017
Remove MASTP3 Core / RAM / Disk limitation  InstallAzureStackPOC.ps1 を実行する前に別ウインドウで実行しておくだけ。
View MASTP3-limitbreakscript.ps1
$i = 0
do
{
$MountVHDMessage = "Mounting Nested Azure Stack HOST VHDX"
if (Test-Path "c:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml")
{
Write-Progress $MountVHDMessage -Status " updating C:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml" -PercentComplete 40
$BareMetalRole = Get-Content "c:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml"
$BareMetalRole = $BareMetalRole.Replace("<MinimumNumberOfCoresPerMachine>12</MinimumNumberOfCoresPerMachine>","<MinimumNumberOfCoresPerMachine>0</MinimumNumberOfCoresPerMachine>")
@Pyromaniaxxx
Pyromaniaxxx / TP3limitbreak.ps1
Created Mar 21, 2017
Azure Stack TP3 CPU/DISK Limit Cancel script
View TP3limitbreak.ps1
$i = 0
do
{
$MountVHDMessage = "Mounting Nested Azure Stack HOST VHDX"
if (Test-Path "c:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml")
{
Write-Progress $MountVHDMessage -Status " updating C:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml" -PercentComplete 40
$BareMetalRole = Get-Content "c:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml"
$BareMetalRole = $BareMetalRole.Replace("<MinimumSizeOfSystemDiskGB>180</MinimumSizeOfSystemDiskGB>","<MinimumSizeOfSystemDiskGB>80</MinimumSizeOfSystemDiskGB>")
@Pyromaniaxxx
Pyromaniaxxx / Get-ArpVenderName
Created Feb 9, 2017
ARPして帰ってきたMACアドレスからベンダー名を調べて一覧表示するやつ
View Get-ArpVenderName
function Convert-MacToVender ($Mac ,$IP)
{
try
{
"$Mac : $IP : " + (Invoke-WebRequest -Uri ("http://api.macvendors.com/$Mac"))
}
catch [System.Net.WebException],[System.Exception]
{
"$Mac : $IP :"
}
View Connect-MASTP2.ps1
$pass = "<<password>>"
$AAD = "xxxx.onmicrosoft.com"
$HostIP = "10.10.10.xx"
New-Item -Path "c:\work" -ItemType Directory -Force | Out-Null
Set-Location "C:\work"
Install-Module -Name AzureRm -RequiredVersion 1.2.6 -Scope CurrentUser
Invoke-WebRequest -Uri https://github.com/Azure/AzureStack-Tools/archive/master.zip -OutFile master.zip
@Pyromaniaxxx
Pyromaniaxxx / Change-NicName.ps1
Last active Oct 17, 2016
NIC 名を Etx0x に揃えるスクリプト
View Change-NicName.ps1
$AdapterList = @(Get-NetAdapter | Where-Object {$_.InterfaceDescription -match 'Eth' } | Select-Object MacAddress,Name,InterfaceDescription|Sort-Object MacAddress);
for ($i = 0; $i -lt $AdapterList.Count; $i++)
{
$AdapterList[$i] | Rename-NetAdapter -NewName ("Eth0{0}" -f ($i+1));
Write-Verbose -Message (" Change network adapoter Name : {0}" -f ("Eth0{0}" -f ($i+1)) );
}
Get-NetAdapter | Where-Object {$_.InterfaceDescription -match 'Eth' } | Select-Object Name,MacAddress,InterfaceDescription|Sort-Object Name
@Pyromaniaxxx
Pyromaniaxxx / Get-AzureStackUtil.ps1
Last active Aug 20, 2016
Azure Stack TP1 インストール後の諸々作業用
View Get-AzureStackUtil.ps1
Set-Location $PSScriptRoot
Invoke-WebRequest -Uri 'http://aka.ms/azStackPsh' -OutFile ((Invoke-WebRequest -Uri http://aka.ms/azStackPsh).Headers.'Content-Disposition'.Split('=')[1] | Where-Object {$_ -like "*.exe"})
Invoke-WebRequest -Uri 'http://aka.ms/massqlrprfrsh' -OutFile MSSQLRP.exe
Invoke-WebRequest -Uri 'http://aka.ms/MASMySQLRP' -OutFile mySQLRP.exe
Invoke-WebRequest -Uri 'http://aka.ms/azasinstaller' -OutFile AppService.exe
Invoke-WebRequest -Uri 'http://aka.ms/azashelper' -OutFile AppServiceHelperScripts.zip
.\MSSQLRP.exe -s2
@Pyromaniaxxx
Pyromaniaxxx / Move-OperationMaster.ps1
Created Jul 16, 2016
ADDS 操作マスタ移行用
View Move-OperationMaster.ps1
#■ ADDS FSMO 確認
Get-ADDomain | Select-Object *master,PDC* | FL
Get-ADForest | Select-Object *master | FL
#■ ADDS FSMO 移行
Move-ADDirectoryServerOperationMasterRole <<移行先ADDCホスト名>> -OperationMasterRole InfraStructureMaster,RIDMaster,PDCEmulator,DomainNamingMaster,SchemaMaster
#■ ADDS FSMO 確認
Get-ADDomain | Select-Object *master,PDC* | FL
Get-ADForest | Select-Object *master | FL
@Pyromaniaxxx
Pyromaniaxxx / Create-Win10InstallUSB.ps1
Last active Jan 8, 2017
Windows 10 インストール用USBメディア作るスクリプト
View Create-Win10InstallUSB.ps1
$DriveLetter = "Z"
$USBDeviceFriendlyName = "Generic USB Flash Disk"
$ISOPath = "D:\ISOs\ja_windows_10_multiple_editions_xxx.iso"
Get-Disk | where FriendlyName -EQ $USBDeviceFriendlyName | Clear-Disk -RemoveData -PassThru | New-Partition -UseMaximumSize -IsActive -DriveLetter $DriveLetter | Format-Volume -FileSystem FAT32 -NewFileSystemLabel USB -Force;
Mount-DiskImage $ISOPath;
$DVDDriveLetter = (Get-DiskImage $ISOPath | Get-Volume).DriveLetter;
Copy-Item "$($DVDDriveLetter):\*" "$($DriveLetter):\" -Recurse -Force -Verbose;
@Pyromaniaxxx
Pyromaniaxxx / Set-NATvSwitch.ps1
Created Apr 21, 2016
NATVMがフリーズする問題を回避するため、NATvSwitchへの迂回路を作るスクリプト
View Set-NATvSwitch.ps1
# NATVM Credential
$LoginUser = "Administrator"
$LoginPass = "NATVMPassword"
$Sstr = ConvertTo-SecureString $LoginPass -AsPlainText -Force
$psc = New-Object System.Management.Automation.PsCredential($LoginUser, $Sstr)
$Cred = Get-Credential -Credential $psc
#create nat vSwitch
$SubnetPrefix = "192.168.255.0/24"
@Pyromaniaxxx
Pyromaniaxxx / Deploy-NestedAzureStack.ps1
Created Apr 12, 2016
Nested Azure Stack 環境を展開するためのスクリプト的な何か
View Deploy-NestedAzureStack.ps1
<#
.DESCRIPTION
Nested Azure Stack Deployment Script
.EXAMPLE
.\Deploy-NestedAzureStack.ps1 -Verbose
.EXAMPLE
.\Deploy-NestedAzureStack.ps1 -Verbose -VMName "HostName" -Remove
.EXAMPLE
.\Deploy-NestedAzureStack.ps1 -VMName "MAS" -CPUCore 32 -RAMSize 184 -DiskSize 200 -Verbose
.INPUTS
You can’t perform that action at this time.