Azure MCP Server を使用して、Azure を操作できるようにするための設定
- GitHub と Azure の接続 の手順を Azure Portal から実施し、Azure 側で、GitHub と接続するための、フェデレーション資格情報を追加する。
- 組織: GitHub ユーザー名
| # This script will manually rip out all VMware Tools registry entries and files for Windows 2008-2019 | |
| # Tested for 2019, 2016, and probably works on 2012 R2 after the 2016 fixes. | |
| # This function pulls out the common ID used for most of the VMware registry entries along with the ID | |
| # associated with the MSI for VMware Tools. | |
| function Get-VMwareToolsInstallerID { | |
| foreach ($item in $(Get-ChildItem Registry::HKEY_CLASSES_ROOT\Installer\Products)) { | |
| If ($item.GetValue('ProductName') -eq 'VMware Tools') { | |
| return @{ | |
| reg_id = $item.PSChildName; |
Azure MCP Server を使用して、Azure を操作できるようにするための設定
| # Adapted from Vadims Podāns' amazing work here. | |
| # https://www.sysadmins.lv/blog-en/how-to-convert-pkcs12pfx-to-pem-format.aspx | |
| # | |
| # Also, if you need a more complete PKI PowerShell module, he has authored one here: | |
| # https://github.com/Crypt32/PSPKI | |
| # | |
| # This version of the function includes a few fixes from the module's version of the | |
| # function and changes up the output options so you get separate .crt/.key files by | |
| # default named the same as the pfx file (or thumbprint if directly referencing a cert). | |
| # -IncludeChain adds an additional -chain.pem. Relative paths are now |
| CREATE OR ALTER FUNCTION dbo.convertuuid(@v uniqueidentifier) | |
| RETURNS uniqueidentifier | |
| AS | |
| BEGIN | |
| DECLARE @r uniqueidentifier | |
| SELECT | |
| @r = | |
| SUBSTRING(CAST(@v AS varbinary(16)),14,1) + | |
| SUBSTRING(CAST(@v AS varbinary(16)),13,1) + | |
| SUBSTRING(CAST(@v AS varbinary(16)),12,1) + |
| SELECT | |
| @@SERVERNAME AS Server, | |
| @@VERSION AS SQLServerVersion, | |
| d.name AS DBName, | |
| d.recovery_model_Desc AS RecoveryModel, | |
| d.Compatibility_level AS CompatiblityLevel, | |
| d.create_date, | |
| d.state_desc, | |
| slo.* | |
| FROM sys.databases AS d |
| create procedure sys.sp_MSactivate_auto_sub | |
| ( | |
| @publication sysname, | |
| @article sysname, | |
| @status sysname = 'active', | |
| @skipobjectactivation int = 0, | |
| @publisher sysname = null | |
| ) | |
| AS | |
| BEGIN |
| USE master | |
| GO | |
| ALTER DATABASE gocowboys SET ACCELERATED_DATABASE_RECOVERY = ON | |
| BACKUP DATABASE gocowboys TO DISK=N'NUL' | |
| BACKUP LOG gocowboys TO DISK=N'NUL' | |
| GO | |
| USE gocowboys | |
| GO |
| package main | |
| import ( | |
| "context" | |
| "database/sql" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "os" | |
| "time" |
| # https://support.microsoft.com/ja-jp/help/4466511/cannot-configure-language-pack-for-windows-server-2019 | |
| $lp_uri = "https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERLANGPACKDVD_OEM_MULTI.iso" | |
| Invoke-WebRequest -Uri $lp_uri -OutFile (Join-Path $ENV:temp ($lp_uri -split "/")[-1]) | |
| Mount-DiskImage (Join-Path $ENV:temp ($lp_uri -split "/")[-1]) | |
| $drive = Get-PSDrive | ? Description -like "*SL1_X64FRE*" | |
| Set-Location ($drive.Name + ":\") | |
| lpksetup.exe /i ja-jp /r /f /s /p ".\x64\langpacks" |
| -- バックアップによるスループットの発生の確認 | |
| SELECT GETDATE(), instance_name, cntr_value | |
| FROM sys.dm_os_performance_counters | |
| WHERE counter_name LIKE '%Backup%' AND instance_name = '_Total' | |
| -- 完全バックアップの発生タイミングの確認 (完全バックアップが発生すると 値が減る) | |
| SELECT modified_extent_page_count | |
| FROM sys.dm_db_file_space_usage |