ファイルやディレクトリの一覧から、必要な行だけを抜き出して表示する例を考えよう。 まず、次のようなディレクトリがあったとする。 PowerShell CoreではSelect-Stringコマンドレットがgrepコマンドと似たような動きをする。 そこでSelect-Stringコマンドレットを ...
Don’t copy and paste the same code over and over again. Instead, create a PowerShell function and save yourself time.
I’m making a new Powershell inventory script. I already have one, but I’m fiddling with the arrays to see if I can make the code a little prettier. I can make variables that have custom members with ...