Skip to content

Instantly share code, notes, and snippets.

View ebibibi's full-sized avatar

Masahiko Ebisuda ebibibi

View GitHub Profile
@ebibibi
ebibibi / Get-DebugInfoForHMEJ.ps1
Created February 12, 2025 07:45
Hybrid Microsoft Entra Joinのトラブルシューティング用情報取得スクリプト
<#
.SYNOPSIS
デバイス登録状況、ローカル証明書、Active Directory 上の証明書、Microsoft Graph のデバイス情報を取得・保存するスクリプト
.DESCRIPTION
本スクリプトは、以下の順序で各種情報を収集します。
1. 出力先ディレクトリの作成
2. dsregcmd /status を実行して出力ファイルに保存し、DeviceId を抽出
3. Microsoft.Graph モジュールがインストールされていなければインストールし、認証済みかチェックして、未認証の場合は認証を促し接続。
#Requires -Version 3.0
# Configure a Windows host for remote management with Ansible
# -----------------------------------------------------------
#
# This script checks the current WinRM (PS Remoting) configuration and makes
# the necessary changes to allow Ansible to connect, authenticate and
# execute PowerShell commands.
#
# IMPORTANT: This script uses self-signed certificates and authentication mechanisms
@ebibibi
ebibibi / unattend.xml
Created May 12, 2022 07:02
sample unattend.xml for sysprep(windows10, 11) / automatic complete OOBE and enable local built-in administrator
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<UserAccounts>
<AdministratorPassword>
#Install-Module -Name PSDscResources -Scope AllUsers -Verbose -Force
Configuration InstallOpsRampClient
{
param()
Import-DscResource -ModuleName PSDscResources -ModuleVersion 2.12.0.0
Node "localhost"
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
Disable-UAC
cinst Microsoft-Hyper-V-All -source windowsFeatures
cinst git
@ebibibi
ebibibi / setup.sh
Last active January 21, 2022 09:35
mkdir /repos
cd /repos
git clone https://github.com/ebibibi/AnsibleHyperVConfig.git
@ebibibi
ebibibi / configureWSforDemo.ps1
Last active April 14, 2024 13:01
Configure Windows Servers for Demo(PowerShell)
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; Get-Boxstarter -Force
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/ebibibi/857b5ec17e466edcbd812fb43e0218a2/raw/configure_windows_by_boxstarter.txt
@ebibibi
ebibibi / configure_windows_by_boxstarter.txt
Last active August 6, 2022 00:25
Configure Windows Servers for Demo(Packages for BoxStarter)
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
Disable-UAC
choco install -y googlechrome python git vscode
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>0411:E0010411</InputLocale>
<SystemLocale>ja-JP</SystemLocale>
<UILanguage>ja-JP</UILanguage>
<UserLocale>ja-JP</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
@ebibibi
ebibibi / configure_windows_by_boxstarter.ps1
Last active August 6, 2022 00:28
configure windows by boxstarter
Set-ExecutionPolicy RemoteSigned -force
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex;
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/ebibibi/cc53c859f2af91737889c2a6f6eb0aa5/raw/boxstarter.txt