- Powershell Core 6.2 Cookbook
- Jan Hendrik Peters
- 100字
- 2021-06-24 15:14:31
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.