LoginSignup
1
1

More than 1 year has passed since last update.

Windows PowerShell コマンド

Last updated at Posted at 2021-10-09

前書き

どうもこんにちは、そこらへんのオフィスか作業部屋を徘徊しているサーバインフラエンジニアです。(´・ω・`)

仕事柄PowerShellコマンドを使うので、備忘録として残そうかなと考えた次第です。
はい、さっそく列挙していきますね。


よく使うコマンド集

絶賛更新中!!(´・ω・`)

コマンド出力結果をテキストファイルとしてフォルダ配下に保存する。

PowerShell
#コマンド[hostname]の出力結果を[C:\work\logs]フォルダ配下に[test.txt]として保存する。(追記保存)
hostname >> C:\work\logs\test.txt

保存したテキストファイルを開く。

PowerShell
#[C:\work\logs]フォルダ配下にある[test.txt]を開く
C:\work\logs\test.txt

コンピューターの管理を開く。

PowerShell
compmgmt.msc

ローカルユーザーとグループのみを開く。

PowerShell
lusrmgr.msc

ADSI エディタを起動する。

PowerShell
adsiedit.msc

PowerShell のログの取り方!

ホスト名を確認する。

PowerShell
hostname

Windows Server の役割と機能の一覧を出力する。

PowerShell
Get-Windows Feature | Format-Table -Autosize -Wrap

コンピュータ名を取得する。

PowerShell
$Env:COMPUTERNAME

サービス一覧を取得する

PowerShell
get-service | select-object displayname,name,status,starttype | Format-Table -AutoSize -Wrap

IPアドレス情報を取得する。

PowerShell
Get-NetIPAddress

関連記事

あとがき

随時更新していくよ!
こんな書き方でいいのかな?(゜-゜)

コマンドの表示を「折り畳み式」にしようか「全開の状態」にしようかで迷ってます。
どちらがいいとかいったコメントいただけると恐縮です。m(_ _)m

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1