He is business-centric and technology-minded. Blawat is an entrepreneur, strategic technical advisor, author, and enterprise architect, who has a passion for the procurement of technology in profit-based organizations. In the next chapter, you will learn techniques to perform data parsing and manipulation by leveraging variables and arrays.īrenton J.W. You are able to add, remove, and search data contained in the hash tables with the use of simple commands. Last, you learned that hashes are best used while correlating data from one value to another. You are able to navigate, add, and remove values in the array based off of a starting value of 0. You also now know that arrays are primarily used in situations where you want to store more than one set of data. These datasets can contain strings but also include mathematical equations that PowerShell has the ability to inherently calculate. This chapter explored that variables are best used for the storage of single-dimensional datasets. These types of data include numbers, strings, and objects. You learned that different types of data can be stored in these containers. You learned that variables, arrays, and hashes have the commonality of being able to store data, but they do it in different ways. This chapter explores the use of a variety of containers. To reference an object's properties and method attributes, you need to do this: This is done by calling the variable, followed by a period, and referencing the property or method. If you want to use the properties and method attributes of that object, you can simply call them using dot notation. You will see all of the attributes of that object displayed on the screen. To view all of the attributes of the System.Date object in the $date variable, you pipe those results to the get-member cmdlet. In this instance, it is displaying the DateTime ScriptProperty attribute on the screen. You then call the $date variable and you see that the output is the date and time from when that command was run. When you execute this, the get-date cmdlet references the System.Date class, and the $date variable inherits all of that object's attributes. You first start by declaring the $date variable and setting it equal to the output from the get-date cmdlet. It is also ideal for those new to the PowerShell language.In this example, you will learn how to place an object into a variable. If you are a system administrator who wants to become an expert in controlling and automating your Windows environment, then Mastering Windows PowerShell Scripting is for you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |