LoginSignup
0
0

More than 5 years have passed since last update.

Power-Shell

Posted at

intro


Get-Help Get-ChildItem -detail

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Get-ExecutionPolicy

$_ special variable


ls *.exe | ForEach-Object {$_.Name}

convert time format


 ls *.exe | ForEach-Object {$_.CreationTime | Get-Date -Format 'yyyymmdd'}

conditional branch instruction



debug

There are several ways:

Write-Host: Write directly to the console, not included in function/cmdlet output. Allows foreground and background colour to be set.

Write-Debug: Write directly to the console, if $DebugPreference set to Continue or Stop.

Write-Verbose: Write directly to the console, if $VerbosePreference set to Continue or Stop.

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