


The below script uses Get-CMApplication command to fetch the list of applications and it’s properties. However If you just type Get-CMApplication in the PowerShell, you will get a list of applications and it’s properties as output. However you will find it difficult to understand the output because it lists many properties. The import-module imports Configuration Manager module into PowerShell. In addition to import the module you will have to specify the path to the Configuration Manager Module. The path is usually “ C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1“. The next command is Set-Location where you specify your site code. The next command is $FilePath where you define the file name and it’s path. This is the file that contains the output. The last command is Get-CMApplication command.
XOJO PROPERTIES CODE
Here we filter the output with selected objects and export the output to the specified file path.Ĭopy the below code and create a new text document. Paste the code in the text document and rename it with filename.ps1 extension. XOJO GET LIST OF PROPERTIES IN A MODULE CODE $FilePath = "C:\powershellscripts\test.csv" Get-CMApplication | Select-Object LocalizedDisplayName,SoftwareVersion,NumberOfDeployments | Export-CSV $FilePath Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1' PowerShell script to list all the application deployments Launch the PowerShell and run the script. In conclusion here is how the output looks.A class is a blueprint for an object to be created. A class itself does nothing but using classes you can create multiple identical objects that can perform operations or can be used as a data resource. In real life, the model (design and functionalities) of a car is a class and the car itself is an object of that class. In the class, we define what the car has in it and what it can do. For example, a car has 4 wheels, 5 gears, steering wheel, etc. We also define what a car can do, like moving forward, backward, turn, etc. A car object created using car class, will have all these properties. If you define a car that has 5 wheels than a car created using this class will have 5 wheels. You get the point.Įnough of theory, now let's see how you can use a class module in VBA. While working in VBA, you must have used Range("A1").select. The select is one of the functions of Range class that select the specified range. all are VBA classes that we use in our subs.įirst, we need to add a class module in VBA Similarly, Debug is class in VBA and print and assert are it's methods. Press ALT+F11 key combination to open excel VBA editor. Move the cursor to Insert-> Class module. The class will be added to the folder "Class module".The same thing can be done from the Insert menu. The default name is like class1, class2, and so on. Now let's create add some attributes to our class.You can change the class name from the property window. Now let's add a function to this class.Since I want these attributes to be available to the public, I have use accessibility operator public. I want a function that says Hi! to the user. I have named my sub Test.ĭim wc As New Welcome 'Declared and initialized Welcome object Insert a new module if you don't have any. Wc.sayHiTo ("Jack") 'used sayHiTo method of Welcome Object. It will prompt "Hi! Jack" on excel workbook. In sub Test, we have created is an object "wc" of Welcome class. An object is created in VBA in two methods. we run the code, Test sub creates an object wc of the Welcome class. This object has all the properties of the Welcome class. We use the sayHiTo method of the Welcome class to say hi to the user. In Instant creation, we create an object while declaring the object with the "new" key. In our example above, we have used instant creation. In delayed creation, we first declare the object only. 'wc.sayHiTo ("Jack") 'generates error since wc is not initialised yet In order to use the object, we need to initialize it with the "new" keyword. In the above examples, we have used public variables for class but it is wrong to practice. We should avoid using public variables in a class.
XOJO PROPERTIES SOFTWARE
XOJO GET LIST OF PROPERTIES IN A MODULE SOFTWARE.
