タグ

2018年1月29日のブックマーク (3件)

  • PowerShell 使い方メモ - Qiita

    コマンドプロンプトと同じ要領でコマンドが入力できる。 コマンドレット PowerShell では、コマンドのことを コマンドレット と呼ぶ。 コマンドレットは、 <動詞>-<名詞> の命名規則に従って定義されている。 例えば、 Get-Content とか、 Get-Date のような感じ。 エイリアス 「フォルダを移動するときのコマンドレットは、 Set-Location です」 と説明すると、 100 人中 190 人くらいは「ありえへん!」と感じ、 PowerShell を勉強する気が失せると思う。 さすがにフォルダ移動するたびに Set-Location と入力してると自殺したくなるので、 PowerShell にはデフォルトでエイリアスが定義されている。 Set-Location のエイリアスは、 cd と chdir と sl が定義されている。 なので、 cd <移動先のパス

    PowerShell 使い方メモ - Qiita
  • PowerShell - 文字列を扱う

    Windows PowerShell で、文字列の扱い方について説明します。 文字列に特定の文字列が含まれているかをチェック 含まれていない場合は、-1 が返る。 $s = "This is a pen" Write-Host $s.IndexOf("a") 文字列の特定の位置から後ろの文字列を抽出 $s = "This is a pen" Write-Host $s.Substring(5) 文字列の一部を抽出 $s = "This is a pen" Write-Host $s.Substring(1,3) 文字列の長さを取得 $s = "This is a pen" Write-Host $s.Length 文字列の型を取得 $s = "This is a pen" Write-Host $s.GetType() 文字列をキャラクタの配列として扱う $s = "This is a p

    PowerShell - 文字列を扱う
  • Windows設定 CapmNetwork

    Windows設定 Windowsコマンドプロンプト Windows PowerShell PowerShellスクリプトの作成と実行 PowerShell変数 PowerShell配列 PowerShell連想配列(ハッシュ) PowerShell演算子 PowerShell制御構文 PowerShell関数 PowerShell例外処理 PowerShellファイル操作 PowerShell設定ファイルの読み込み Windowsバッチファイル Windowsバッチファイルの作成と実行 Windowsバッチファイル引数 Windowsバッチファイル特殊な文法 Windowsバッチファイル変数 Windowsバッチファイル演算子 Windowsバッチファイル制御構文 Windowsバッチファイル外部ファイルの読み書き Windowsバッチファイル実行結果の取得 コマンド関連 Windows