This file contains 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
<# | |
.SYNOPSIS | |
Remote Desktop ServiceのRDP-Tcp Connectionのアクセス権を取得します。 | |
.PARAMETER ComputerName | |
対象となるコンピューター名を設定します。未指定の場合は現在のコンピューター名が対象になります。 | |
.PARAMETER TerminalName | |
対象となるターミナル名を設定します。通常は"RDP-Tcp"が指定されます。 | |
.PARAMETER Credential | |
リモートコンピュータに対する認証情報を設定します。 | |
String型もしくはPSCredential型の値を設定してください。 |
This file contains 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
<# | |
.SYNOPSIS | |
和暦の日付を取得します。 | |
.EXAMPLE | |
Get-JapaneseDate | |
.EXAMPLE | |
Get-JapaneseDate -format "ggyy年MM月dd日" | |
.EXAMPLE | |
Get-Date -Year 2015 -Month 12 -Day 31 | Get-JapaneseDate | |
#> |
This file contains 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
<# | |
.SYNOPSIS | |
Remote Desktop ServiceのRDP-Tcp Connectionのアクセス権を設定します。 | |
.PARAMETER AccountName | |
対象となるアカウント名を指定します。 | |
.PARAMETER PermissionMask | |
更新する権限を指定します。複数指定可能です。 | |
Query : 情報の照会(WINSTATION_QUERY) | |
Set : 情報の設定(WINSTATION_SET) | |
Logoff : ログオフ(WINSTATION_LOGOFF) |
This file contains 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
<# | |
.SYNOPSIS | |
Remote Desktop ServiceのRDP-Tcp Connectionのアクセス権を初期状態に戻します。 | |
.PARAMETER TerminalName | |
対象となるターミナル名を設定します。通常は"RDP-Tcp"が指定されます。 | |
.PARAMETER ComputerName | |
対象となるコンピューター名を設定します。未指定の場合は現在のコンピューター名が対象になります。 | |
.PARAMETER Credential | |
リモートコンピュータに対する認証情報を設定します。 | |
String型もしくはPSCredential型の値を設定してください。 |
This file contains 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
<# | |
.SYNOPSIS | |
Remote Desktop ServiceのRDP-Tcp Connectionに新しいアカウントを追加します。 | |
.PARAMETER AccountName | |
対象となるアカウント名を指定します。 | |
.PARAMETER PermissionPreset | |
更新する権限を指定します。複数指定することはできません。 | |
Guest : ゲストアカウント(Logonのみ可能) | |
User : ユーザーアカウント(Logon,Connect,Query可能) | |
All : 管理者アカウント(Reset以外すべて可能) |
This file contains 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
<# | |
.SYNOPSIS | |
Remote Desktop ServiceのRDP-Tcp Connectionにあるアカウントを削除します。 | |
.PARAMETER AccountName | |
対象となるアカウント名を指定します。 | |
.PARAMETER TerminalName | |
対象となるターミナル名を設定します。通常は"RDP-Tcp"が指定されます。 | |
.PARAMETER ComputerName | |
対象となるコンピューター名を設定します。未指定の場合は現在のコンピューター名が対象になります。 | |
.PARAMETER Credential |
This file contains 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
<# | |
.Synopsis | |
コマンドを検索し文字列形式で返します。 | |
.DESCRIPTION | |
コマンドを検索し文字列形式で返します。 | |
Get-Commandコマンドレットのラッパーになります。 | |
返される文字列の形式は "[コマンドの種別] : [名称およびPath]"になります。 | |
.PARAMETER Name | |
検索する名称を指定します。 |
This file contains 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
<# | |
.Synopsis | |
Windows10で暗いテーマカラーを使用するか否かを設定します。 | |
.DESCRIPTION | |
設定メニューなどのダイアログは通常明るいテーマ色に設定されていますが、 | |
このファンクションを使うことで"暗い"テーマ色にすることができます。 | |
.PARAMETER Enabled | |
$trueを設定すると"暗い"テーマ色にします。 | |
$falseを設定すると通常のテーマ色に戻します。 | |
.EXAMPLE |
This file contains 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
# | |
# Windows Server 2016 TPにGUI Shellをインストールするやーつ | |
# ※ソースドライブは最初に見つかったドライブ決め打ちで | |
# | |
PowerShell "&{ Add-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Source (\"WIM:{0}\sources\install.wim:4\" -F (Get-CimInstance Win32_CDROMDrive | Sort-Object Drive)[0].Drive) -Restart }" |
This file contains 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 ADDS/GPMC/RSAT(ADTools) Components | |
# | |
Add-WindowsFeature AD-Domain-Services, GPMC, RSAT-ADDS, RSAT-AD-PowerShell | |
# | |
# Create new Forest/Domain | |
# | |
Import-Module ADDSDeployment | |
$Params = @{ |