LoginSignup
0
5

More than 5 years have passed since last update.

PowerShellの便利なワンライナー

Last updated at Posted at 2017-01-19

PowerShellの便利なワンライナー

※自分用まとめです。

  • 作成日時変更1
powershell -Command Set-ItemProperty C:\hoge.txt; -name CreationTime -value '2015/12/29 01:23:45'
  • 更新日時変更1
powershell -Command Set-ItemProperty C:\hoge.txt; -name LastWriteTime -value '2015/12/29 01:23:45'
  • サービスのプロセスIDを取得する2
$ID = (Get-Wmiobject Win32_Service | ? { $_.Name -eq $ServiceName }).ProcessID

参考用URL

0
5
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
0
5