라벨이 PowerShell인 게시물 표시

Windows PowerShell security goals

이미지
Set-ExecutionPolicy 를 통해 실행 권한 설정을 하자. 아니면 Digital code signing을 하자.

A PowerShell Provider. 가장 중요한 개념이 아닐까 싶군.

A PowerShell provider, or PSProvider, is an adapter. It’s designed to take some kind of data storage and make it look like a disk drive. Provider 개념을 통해 대상에 대한 일관된 Interface를 제공하는 것이 큰 장점.

$_

This is the placeholder for the current value in the pipe line and must be in { }. 넹~.

Pipeline in PowerShell

오~ 놀랍다. Pipeline input ByValue Pipeline input ByPropertyName Custom properties Parenthetical commands Extracting the value from a single property import-XXX, select (-expand) 등등 잘 써보자.

Objects and Pipeline in PowerShell

Why PowerShell uses objects One of the reasons why PowerShell uses objects to represent data is that, well, you have to represent data somehow, right? PowerShell could have stored that data in a format like XML, or perhaps its creators could have decided to use plain-text tables. But they had some specific reasons why they didn’t take that route. The first reason is that Windows itself is an object-oriented operating system—or at least, most of the software that runs on Windows is object oriented. Choosing to structure data as a set of objects is easy, because most of the operating system lends itself to those structures. Another reason to use objects is because they ultimately make things easier on you and give you more power and flexibility. The pipeline: enabling power with less typing One of the reasons we like PowerShell so much is that it enables us to be more effective administrators without having to write complex scripts, like we used to have to do in VBScript. ...

PowerShell에서 파일에 저장된 값을 파라미터 값으로 쓰기

Get-EventLog Security -ComputerName (Get-Content l.txt) 아항~