
上QQ阅读APP看书,第一时间看更新
Exploring object methods
Alongside object properties, we also often need object methods to manipulate objects or access information. Like properties, methods are members of a class that each object will offer. Through reflection, Get-Member can also provide detailed information about methods of a class or an object.
We commonly use object methods to accomplish tasks for which there are no built-in cmdlets available, such as writing NTFS access control entries. Object methods are also commonly used to alter object properties that would otherwise be read-only, like the full name of a file, which can be changed with the MoveTo method.