You are reading the article Parameterization, Functions, Transactions In Loadrunner updated in December 2023 on the website Daihoichemgio.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Parameterization, Functions, Transactions In Loadrunner
A recorded script can simulate a virtual user; however, a mere recording may not be enough to replicate the “real user behaviour”.
The above is the most significant consideration when conducting “Performance Testing”, but there is more to a VU Script. How will you gauge the precise amount of time taken by a VUser when SUL is undergoing a performance test? How would you know if the VUser has passed through or failed at certain point? What is the cause behind the failure, whether some backend process failed or the server resources were limited?
We need to enhance our script to help answer all above questions.
Using TransactionsApplying transactions is straightforward. Just write one line of code before request is made to the server and close the transaction when the request ends. LoadRunner requires only a string as transaction name.
To open a transaction, use this line of code:
lr_start_transaction(“Transaction Name”);
To close the transaction, use this line of code:
LR_AUTO
LR_PASS
LR_FAIL
Example:
lr_end_transaction(“Business_Workflow_Transaction Name”, LR_FAIL);
Points to note:
Don’t forget, you are working with “C” and that is a case-sensitive language.
Period (.) character is not allowed in transaction name, although you can use spaces and underscore.
If you’ve branched your code well and added checkpoints to verify the response from the server, you can use custom error handling, such as, LR_PASS or LR_FAIL. Otherwise, you can use LR_AUTO and LoadRunner will automatically handle server error (HTTP 500, 400 etc.)
When applying transactions, ensure there is no think_time statement being sandwiched or otherwise your transaction will always include that period.
Since LoadRunner requires a constant string as transaction name, a common problem when applying transaction is mismatch of string. If you give a different name when opening and closing a transaction, you will at least 2 errors. Since the transaction you opened was never closed, LoadRunner will yield an error. Besides, the transaction you are trying to close was never opened, hence resulting an error.
Can you use your intelligence and answer to yourself which of the above error will be reported first? To validate your answer, why not make your own mistake? If you had answered right, you are on track. If you answered wrong, you need to focus.
Since LoadRunner automatically takes care of synchronization of requests and response, you will not have to worry about response when applying transactions.
Understanding Think Time, Rendezvous Points and Comments Rendezvous PointsRendezvous Points means “meeting points”. It is just one line of statement that tells LoadRunner to introduce concurrency. You insert rendezvous points into VUser scripts to emulate heavy user load on the server.
Rendezvous points instruct VUser to wait during test execution for multiple VUser to arrive at a certain point, so that they may concurrently perform a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 VUser to deposit cash into their accounts at the same time. This can be achieved easily using rendezvous.
If the rendezvous points are not places correctly, the VUser will be accessing different parts of the application – even for the same script. This is because every VUser gets different response time and hence few users lag behind.
Syntax: lr_rendesvous(“Logical Name”);
Best Practices:
Prefix a rendezvous point with “rdv_” for better code readability; e.g. “rdv_Login”
Remove any immediate think time statements
Applying rendezvous points in a script view (after recording)
Comments
While recording (using tool)
After recording (directly writing in code)
Inserting Functions through menuWhile you can directly write simple lines of code, you may need a clue to recall a function. You can also use Steps Toolbox (known as Insert Function prior to version 12) to find and insert any function directly into your script.
You can find Steps Toolbar under View àSteps Toolbox.
This will open a side window, look at the snapshot:
What is Parameterization?A parameter in VUGen is a container that contains a recorded value that is replaced for various users.
During the execution of the script (in VUGen or Controller), the value from an external source (like .txt, XML or database) substitutes the previous value of the parameter.
Parameterization is useful in sending dynamic (or unique) values to the server, for example; a business process is desired to run 10 iterations but picking unique user name every time.
It also helps in stimulating real-like behavior to the subject system. Have a look at below example:
Problem examples:
Business process works only for the current date which comes from the server, hence can’t be passed as a hardcoded request.
Sometimes, the client application passes a Unique ID to the server (for example session_id) for the process to continue (even for a single user) – In such a case, parameterization helps.
Often, the client application maintains a cache of data being sent to and from the server. As a result, server is not receiving a real user behavior (in case server runs different algorithm depending upon search criteria). While VUser script will execute successfully, the performance statistics drawn will not be meaningful. Using different data through parameterization helps emulates server side activity (procedures etc.) and exercises the system.
A date that is hard-coded in the VUser during recording may no longer be valid when that date has passed. Parameterizing the date allows VUser execution to succeed by replacing the hard-coded date. Such fields or requests are the right candidates for parameterization.
Run Time Settings and their impact on VU simulation
Run Time Settings bear as much significant as your VUGen Script. With varying configurations, you can obtain different test designs. This is why, you may end up in non-repeatable results if Run Time Settings are not consistent. Let’s discuss each attribute one by one.
Run LogicRun Logic defines the number of times all actions will be executed, except vuser_init and vuser_end.
Probably this makes clearer why LoadRunner suggests keeping all the Login code within vuser_init, and Logout part in vuser_end, both exclusively.
If you’ve created multiple actions, let’s say, Sign in, Open Screen, Calculate Rental, Submit Funds, Check Balance and logout, then, below scenario will take place for each VUser:
All VUsers will login, execute Open Screen, Calculate Rental, Submit Funds, Check Balance – then – again Open screen, Calculate rentals…and so on – iterating 10 times – followed by logout (once).
This is a powerful setting enabling to act more like a real user. Remember, a real user does not login and logouts every time – he, usually, repeats same steps.
PacingThis is important. Mostly people are unable to understand the different between pacing and think time. The only difference is, “pacing refers to the delay between iterations” whereas think time is the delay between any 2 steps.
Recommended setting depends upon the test design. However, if you are looking to have aggressive load, consider opting “As soon as the previous iteration ends”
LogA log (as generally understood) is a bookkeeping of all events while you run LoadRunner. You can enable log to know what’s happening between your application and your server.
LoadRunner gives powerful logging mechanism which is robust and scalable on its own. It allows you to keep only “Standard Log” or a detailed, configurable extended log or disable it altogether.
A standard log is informative and easily understandable. It contains just the right amount of knowledge you will generally require troubleshooting your VUser scripts.
In the case of Extended Log, all the Standard log information is a subset. Additionally, you can have parameter substitution. This tells LoadRunner component to include complete information of all the parameters (from parameterization) including requests, as well as response data.
If you include “Data Returned by Server” then your log will go in length. This will include all the HTML, tags, resources, non-resources information included right within the log. The option is good only if you need serious troubleshooting. Usually, this makes the log file very big in size and not easily comprehendible.
Tips:
No matter how much time VUGen takes when log is enabled, it has no impact on the transaction response time. HP calls this phenomenon as “state of the art technology.”
Disable log if it is not required.
Disable log when you are finished with your scripts. Including scripts with logging enabled will cause controller to run slower and report nagging messages.
Disabling log will increase the capacity of the maximum number of users you can simulate from LoadRunner.
Consider using “Send message only when error occurs” – this will mute unnecessary information messages and report only error related messages.
Think TimesThink Time is simply the delay between two steps.
Think Time helps replicates user behavior since no real user can use any application like a machine (VUGen). VUGen generates think time automatically. You still have complete control to remove, multiply or fluctuate the duration of think time.
If you are looking to simulate aggressive load on the application, consider disabling think time completely.
However, to simulate a real like behavior, you can “User Random Think Time” and set the percentages as desired.
Consider using Limit Think Time to a legitimate period. Usually, 30 seconds is fairly good enough.
Speed SimulationSpeed simulation simply refers to bandwidth capacity for each client machine.
Since we are simulating thousands of VUser’s through LoadRunner, it is amazing how simple LoadRunner has made to control the bandwidth/network speed simulation.
If you are customers access your application over 128 Kbps, you can control it from here. You will get to simulate “real like behavior” which should help getting the right performance statistics.
The best recommendation is to set to Use maximum bandwidth. This will help disregard any network related performance bottlenecks and focus on any potential issues in the application first. You can always run the test multiple times to see varying behavior under different circumstances.
Browser EmulationUser experience does not depend upon the browser an end user is using. Clearly, this is beyond the scope of Performance measures. However, you can choose which browser you wish to emulate.
Can you answer to yourself when exactly it will really matter for you to select the right browser in this configuration?
You will use this configuration if you are subject application is a web application, returning different responses for different browsers. For example, you get to see different images and contents for IE and Firefox etc.
Another important setting is Simulate browser cache. If you want to gauge the response time when cache enabled, check this box. If you are looking for worst case situation, this is obviously not a consideration.
Download non-HTML resources will let LoadRunner download any CSS, JS and other rich media. This should be remained checked. However, if you which to eliminate this from your performance test design, you can uncheck this.
ProxyIt is best to eliminate proxy completely from your Test Environment – this will make the test results unreliable. However, you might face situations where it is inevitable. In such a situation, LoadRunner does facilitate you with proxy settings.
You will be working (or should be working) with No proxy setting. You can obtain it from your default browser. However, don’t forget to check which browser is set to default and what proxy configuration for default browser is.
Congratulations. You are done with configuration your VUGen script. Don’t forget to configure it for all your VUser scripts.
You're reading Parameterization, Functions, Transactions In Loadrunner
How To View Inter Bank Transactions Report In Tallyprime
The Inter Bank Transactions report provides the details of all transactions carried out between the banks during the analysis year.
The above report displays the details of Inter Bank transactions along with Date, Particular, Vch Type, Vch No, Debit and Credit balances, Instrument Date, Bank Date, No of Days Delayed, Verification Status and Verification Note.
Note: The No. of Days Delayed will be displayed based on the Date of Instrument and the date on which it was cleared (Bank Date). If the Bank Date is not mentioned the last day of the Analysis Period will be considered as Bank Date (31st March) for calculating No. of Days delayed.
F2 (Period): press F2 to change the selected period.
F3 (Company): press F3 to change the company.
F8 (Show Ledger): press F8 to display the default Ledger Vouchers report for the selected party along with the details of the Opening Balance, Current Total and Closing Balance.
You can follow this step to open any of the Accounting, Inventory, and Analysis Reports from the list.
Alt+J (Set Manual Sampling): press Alt+J to mark the selected Vouchers (using spacebar) as sampled. The manual sampling method will get applied to all such Vouchers and they will appear under the sampled column on the dashboard.
Alt+L (Delete Manual Sampling): press Alt+L to delete the Manual sampling method already applied for the selected Vouchers (using the spacebar)
Alt+Q (Reconcile): press Alt+Q to reconcile the inter bank transactions by specify the Bank Date if the vouchers are not reconciled. Reconciliation screen will be displayed based on the ledger on which the cursor is placed.
Alt+S (Remove Verify): press Alt+S to change the Verify Status for the selected vouchers as not verified.
Alt+F12 (Range): press Alt+F12 to use the Range Filter option to search the specific vouchers from the list of vouchers under each Voucher Type.
Ctrl+F12 (Value): press Ctrl+F12 to filter the Vouchers and calculate the balances as per the specified conditions.
Press F12 (Configure) to change the default view for the above report.
Show Received from (Cash): Set this option to Yes to display the name of the party from whom the fund is transferred.
Show Verification Status: Set this option to Yes to view the verification status of the vouchers.
Show transactions with Verification Status: Set this option to Yes to view the vouchers alongside the respective Verification Status (On Hold/Altered/Clarified/Internal Observation/External Observation/Internal Observation Clarified/Not Verified/Verified).
Show Verification Note: Set this option to Yes to display the Verification Note as entered by the user during the verification. This option is set to Yes by default.
Show Client’s Clarification Note: Set this option to Yes to view the Clarification provided by the user for Vouchers that have been marked for Internal Observation/External Clarification.
Show Date and Time: Set this option to Yes to view the date on which, and time at which, clarification was provided for the listed Vouchers.
Show Verified By: Set this option to Yes to view the person who has performed analysis on the Vouchers.
Show Clarification from: Set this option to Yes to view the user who has provided clarification, if any, for the Vouchers.
Include Vouchers with exemptions: Set this option to Yes to include Vouchers marked as Optional in this report.
Display name for Ledgers: Select the required Display Name for the Ledgers from the list of Display Name Style.
Sorting Method: Select the required sorting method – Alphabetical, Amount-wise or No of Days Delayed, for the transactions from the list of Sorting Methods.
Excel Rows And Columns Functions
You’ll typically find the ROW(S) or COLUMN(S) functions nested inside other functions because they make formulas more efficient to write. However, many users get caught out by these functions because you don’t edit the cell references in the same way you might with other formulas.
Watch the Video
Download Workbook
Enter your email address below to download the sample workbook.
By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.
Excel ROWS and COLUMNS Functions Explained
You’ve probably seen a formula like this before:
=VLOOKUP($B16,$B$4:$D$13,
COLUMNS($B4:C4)
,0)
Or this:
=INDEX($C$3:$H$8,
ROWS($A$3:A4)
,COLUMNS($A$1:B1)
)
And you may have even emailed me to ask “what is the ROWS/COLUMNS function doing in this formula”. The short answer is it’s returning a number, or in multi-cell array formulas, a series of consecutive numbers.
Why do you use them? Because it’s an efficient way to write formulas that require copying down columns, across rows, or both.
Just take the VLOOKUP formula above; the COLUMNS function is returning the col_index_num argument. Remember the syntax for VLOOKUP is:
=VLOOKUP(lookup_value, table_array,
col_index_num
, [range_lookup])
Here’s the formula again:
=VLOOKUP($B16,$B$4:$D$13,
COLUMNS($B4:C4)
,0)
COLUMNS evaluates to 2 because it returns the number of columns in a range:
=VLOOKUP($B16,$B$4:$D$13,
2
,0)
And when you copy that formula across to the next column it becomes:
=VLOOKUP($B16,$B$4:$D$13,
COLUMNS($B4:D4)
,0)
Which evaluates to:
=VLOOKUP($B16,$B$4:$D$13,
3
,0)
So, you can see that using COLUMNS in the col_index_num argument of your VLOOKUP formula enables you to copy and paste it across the row and it will automatically increase the next col_index_num by 1, without so much as an F2 to edit the formula.
Now we have a rough idea of how these functions work and why you’d use them, let’s understand the four functions you can use.
ROW, ROWS, COLUMN and COLUMNS
ROWS Function
The ROWS function returns the number of rows in a range:
=ROWS(A3:A6) returns 4 because there are 4 rows in the range A3:A6.
Note; the column reference is actually irrelevant, which means you could also write this formula as ROWS(3:6) or more likely, ROWS($3:6). That way row 3 is absolute (anchored), and when you copy the formula to consecutive rows the formula will become ROWS($3:7) and so on.
ROW Function
The ROW function returns the row number of a reference:
=ROW(A3) returns 3 i.e. A3 is on row 3.
Note: you can’t write this as ROW(3) but you can write ROW(3:3). And ROW() will return the number of its own row.
COLUMNS Function
The COLUMNS function returns the number of columns in a range:
=COLUMNS(B2:D2) returns 3 because there are 3 columns in the range B2:D2.
Similar to ROWS the row number for the COLUMNS function is irrelevant, which means you could also write this formula as COLUMNS(B:D) or COLUMNS($B:D).
COLUMN Function
The COLUMN function returns the column number of a reference:
=COLUMN(C2) returns 3 because column C is the third column.
Note: you can’t write COLUMN(C) but you can write COLUMN(C:C). And COLUMN() will return the number of its own column.
The key with getting the desired results from these functions is the correct use of Absolute Cell Referencing.
Use Excel ROWS and COLUMNS Functions in Array Formulas
Typically people get caught out when editing array formulas which contain one of these functions.
Let’s take this example below where the formula in column C is a multi-cell array formula that is returning the 3 smallest values from cells A1:A6:
The SMALL formula evaluates like so:
=SMALL(A1:A6,
ROW(A1:A3)
)=SMALL({12;31;25;46;28;50},
{1;2;3}
)
In this case ROW is returning a series of sequential numbers from 1 to 3 and as a result cell C2 returns the smallest value, cell C3 returns the second smallest and cell C4 returns the third smallest.
Problems arise when people try to edit formulas like this that they’ve copied them from somewhere, maybe another workbook, or somewhere they’ve found in a Google search.
Excel experience tells us to adjust range references to suit our data, so let’s say your data is in cells B2:B7 like so:
You might be tempted to copy the formula above and edit it to suit your data like this:
=SMALL(
B2:B7
,ROW(B2:B4)
)
After all, if you’re changing A1:A6 to B2:B7 for SMALL shouldn’t you also change A1:A3 to B2:B4 for ROW? NO. If you do you’ll end up with this:
=SMALL(
{12;31;25;46;28;50}
,{2;3;4}
)
Which would be correct for the values in cells B2:B7 but not for the ROW function reference, which as you can see above now incorrectly returns 2, 3, 4.
The correct formula is:
=SMALL(
B2:B7
,ROW(B1:B3)
)=SMALL(
{12;31;25;46;28;50}
,{1;2;3}
)
Because we want the 3 smallest values, not the 2nd, 3rd and 4th smallest.
So, now you know why ROW, ROWS, COLUMN and COLUMN are typically used you’ll be able to use them in your own formulas and not get caught out editing formulas that already use these clever functions.
Caution
Pay particular attention to how these functions adjust when rows or columns are inserted above (or to the left for COLUMN/COLUMNS), or in between cells containing these formulas as it can yield unexpected results (read; formula errors).
Absolute referencing is your ally but the approach differs depending on whether you’re using these functions in an array formula or a regular formula.
Here are some tips; the formulas below will adjust as a result of rows/columns being inserted above/to the left but they will still return the same results:
Regular Formulas
=ROWS($A$1:A1) or =ROWS($1:1)
=COLUMNS($A$1:A1) or =COLUMNS($A:A)
Copy and paste (or fill) the above formulas to extend the range.
Array Formulas
=ROW(A1:A10)-ROW(A1)+1
=COLUMN(A1:J1)-COLUMN(A1)+1
The above formulas will return the numbers 1 to 10. Adjust the range referenced to suit your needs.
Examples of Formulas that use ROW(S) or COLUMN(S) Functions
VLOOKUP with dynamic column index
Summarise monthly data into quarters
Lookup and return multiple matches
List missing numbers in a sequence
Find a column containing a specific value
Remove blank cells from a range
Different Types Of Sql Functions
SQL, or Structured Query Language, is a programming language used for managing and manipulating relational databases. One of the most powerful features of SQL is the ability to use functions to perform various operations on the data in a database. In this article, we’ll discuss the different categories of SQL functions and provide code examples to help illustrate their use.
Aggregate FunctionsAggregate functions are used to perform calculations on a set of values and return a single result. Some of the most commonly used aggregate functions in SQL include −
COUNT() – Returns the number of rows in a table or the number of non-NULL values in a column
SUM() – Returns the sum of all non-NULL values in a column
AVG() – Returns the average of all non-NULL values in a column
MIN() – Returns the minimum value in a column
MAX() – Returns the maximum value in a column
Here’s an example of using the COUNT() function to find the number of rows in a table called “orders” −
SELECT
COUNT
(
*
)
FROM
orders;
And here’s an example of using the SUM() function to find the total cost of all orders in the table −
SELECT
SUM
(
total_cost)
FROM
orders;
Scalar FunctionsScalar functions are used to perform calculations on a single value and return a single result. Some examples of scalar functions in SQL include −
LENGTH() – Returns the number of characters in a string
UPPER() – Converts a string to uppercase
LOWER() – Converts a string to lowercase
CONCAT() – Concatenates two or more strings together
ROUND() – Rounds a number to a specified number of decimal places
Here’s an example of using the UPPER() function to display the names of all customers in uppercase −
SELECT
UPPER(
customer_name)
FROM
customers;
And here’s an example of using the ROUND() function to round the total cost of an order to two decimal places −
SELECT
ROUND
(
total_cost,
2
)
FROM
orders;
Date and Time FunctionsSQL also provides a number of functions for working with date and time values. Some examples of date and time functions in SQL include −
NOW() – Returns the current date and time
CURRENT_DATE() – Returns the current date
CURRENT_TIME() – Returns the current time
YEAR() – Returns the year of a date
MONTH() – Returns the month of a date
DAY() – Returns the day of a date
Here’s an example of using the NOW() function to find the current date and time −
SELECT
NOW
(
)
;
And here’s an example of using the MONTH() function to find the month of an order’s date −
SELECT
MONTH
(
order_date)
FROM
orders;
String FunctionsSQL also provides a number of string manipulation function. Some examples of string functions in SQL include −
LTRIM() – Removes the leading whitespace of the string
RTRIM() – Removes the trailing whitespace of the string
TRIM() – Removes both leading and trailing whitespace of the string
SUBSTRING() – Extracts a specific portion of a string
REPLACE() – Replaces all occurrences of a specified string with another string
Conditional FunctionsSQL also provides a number of functions that perform different actions based on certain conditions. Some examples of conditional functions in SQL include −
CASE – evaluates a list of conditions and returns a result for the first condition that is met
IF – return a specified value if the condition is met, otherwise return another specified value
COALESCE – return the first non-null expression among multiple expressions.
Here’s an example of using the CASE function to assign a label to each order based on the total cost −
SELECT
order_id,
total_cost,
CASE
ELSE
'inexpensive'
END
as
"price range"
FROM
orders;
Here’s an example of using the IF function to check the availability of stock of a product
SELECT
product_name,
"Availability"
FROM
products;
Here’s an example of using the COALESCE function to display the primary phone number and the secondary phone number of a customer −
SELECT
customer_name,
COALESCE
(
primary_phone,
secondary_phone)
as
"Phone Number"
FROM
customers;
Logical FunctionsSQL provides a set of logical functions that return a Boolean value, which can be either true or false. Some examples of logical functions in SQL include −
AND – Returns true if both the conditions are true
OR – Returns true if at least one of the conditions is true
NOT – Negates a boolean value
Here’s an example of using the AND function to find all customers who live in a specific city and have an account balance greater than a certain amount −
SELECT
customer_name,
city,
account_balanceFROM
customers Conversion FunctionsSQL provides a number of functions that can be used to convert data from one type to another. Some examples of conversion functions in SQL include −
CAST() – Converts a value from one data type to another
CONVERT() – Converts a value from one data type to another (This function is specific for some database vendors like SQL Server)
TO_DATE() – Converts a string to a date value
TO_TIME() – Converts a string to a time value
TO_TIMESTAMP() – Converts a string to a timestamp value
Here’s an example of using the CAST() function to convert a float value to an int −
SELECT
CAST(
priceAS
INT
)
as
"Integer Price"
FROM
products;
Here’s an example of using the TO_DATE() function to convert a string to a date value −
SELECT
TO_DATE(
order_date,
'yyyy-mm-dd'
)
as
"Formatted Order Date"
FROM
orders;
Window FunctionsSQL provides a set of functions that can be used to perform calculations across a set of rows that are related to the current row. These functions are known as window functions. Some examples of window functions in SQL include −
RANK() – Assigns a unique rank to each row within a result set, based on the values in one or more columns
DENSE_RANK() – Assigns a unique rank to each row within a result set, based on the values in one or more columns, but does not leave gaps in the ranking sequence when there are ties
ROW_NUMBER() – Assigns a unique number to each row within a result set, based on the order specified in the ORDER BY clause of the function
Here’s an example of using the RANK() function to find the rank of each customer based on their account balance −
SELECT
customer_name,
account_balance,
RANK(
)
OVER
(
ORDER
BY
account_balanceDESC
)
as
"Rank"
FROM
customers;
Here’s an example of using the ROW_NUMBER() function to find the row number of each customer in the table −
SELECT
customer_name,
ROW_NUMBER(
)
OVER
(
ORDER
BY
customer_id)
as
"Row Number"
FROM
customers;
These are just a few examples of the many functions that SQL provides for working with and manipulating data in a relational database. Each category of functions serves its own unique purpose, and understanding when and how to use them can help to make working with SQL and relational databases more efficient and effective.
ConclusionSQL functions are an incredibly powerful tool for working with and manipulating data in a relational database. In this article, we’ve discussed the different categories of SQL functions, including aggregate functions, scalar functions, date and time functions, string functions, and conditional functions, and provided examples of how they can be used. Understanding and being proficient in the use of these functions is an essential part of working with SQL and relational databases.
How To View Highest And Lowest Value Transactions In Tallyprime
The Highest and Lowest Value Transactions in TallyPrime is a report that provides ledger-wise Highest and Lowest amount transactions along with the Difference Range and Difference Range Percentage.
The report displays the Highest Transaction Amount, Lowest Transaction Amount, Difference Range and Difference Range Percentage of all Ledgers. Users can drill down from the above report to view ledger-wise Highest and Lowest Value Transactions.
The basis for display of Highest and Lowest transactions for a ledger is also displayed on top of the screen.
To display the Highest and Lowest Value Transactions for a ledger, by default 5 Highest value and 5 Lowest value transactions has been set.
Users can configure the display of Highest and Lowest Transactions by pressing on F12 (Configure) and alter the numbers to show highest and lowest transactions.
Press
F2 (Period) to change the selected period.
Press
F4 (Group)to select a different ledger and display the Highest and Lowest Amount Transactions report for the selected group.
Press
F8 (Show Ledger) to display the default ledger vouchers report for the selected party along with the details of the Opening Balance, Current Total and Closing Balance.
You can follow this step to open any of the Accounting, Inventory, and Verification reports from the list.
Press Alt+J (Set Manual Sampling): to mark the selected Vouchers (using spacebar) as sampled. The manual sampling method will get applied to all such Vouchers and they will appear under the sampled column on the dashboard.
Press Alt+L (Delete Manual Sampling): to delete the Manual sampling method already applied for the selected Vouchers (using the spacebar).
Press
Alt+S (Remove Verify) to change the Verify Status for the selected Vouchers as Not Verified.
Press Alt+F12 (
Range): to use the Range Filter option to search the specific vouchers from the list of Vouchers under each Voucher Type.
Press
Ctrl+F12 (Value): to use the Value Filter option to search the specific vouchers as per the specified user defined criteria.
Press F12 (Configure) to change the default view for the above report.
Show Highest: Define the Number of Highest Value Transactions to be considered for displaying in the report.
Show Lowest: Define the Number of Lowest Value Transactions to be considered for displaying in the report.
Show Verification Status: Set this option to Yes to display the Verification Status as selected by the user during the analysis. This option is set to Yes by default.
Show Verification Note: Set this option to Yes to display the Verification Note as entered by the user during the analysis. This option is set to Yes by default.
Show Client’s Clarification: Set this option to Yes to display the Clarification Note entered by the user for the Vouchers marked as Need Clarification by the user.
Show Date and Time: Set this option to Yes to view the date on which, and time at which, clarification was provided for the listed Vouchers.
Show Verified By: Set this option to Yes to view the person who has performed verification on the Vouchers.
Show Clarification from: Set this option to Yes to view the user who has provided clarification, if any, for the Vouchers.
Show Verification Status: Select a Verification Status and the Vouchers that have been marked with the chosen Verification Status will be filtered and displayed.
Include Exceptional Vouchers: Set this option to Yes to include Vouchers marked as Optional in this report.
What Is Microsoft Powershell? Functions And Uses
Instead, you can use a single line of code to complete complex procedures with finesse and ease. This might seem like a dream too good to be true, but it’s not.
Welcome to the world of Microsoft PowerShell!
Microsoft PowerShell is a modern task-based command-line shell, scripting language, and configuration management framework. It’s built on the .NET framework, which allows power users to control and automate the administration of operating systems and apps using code.
Initially built for Windows, PowerShell has evolved into an open-source project, making it accessible for installation on various platforms, including Windows, Linux, and macOS.
in this article, we’ll delve deep into the endless potential of Microsoft PowerShell. We’ll unlock the secrets behind cmdlets, scripts, and pipelines and demonstrate how you can leverage PowerShell to simplify your tasks and supercharge your productivity.
Let’s take a closer look at this powerful tool!
Microsoft PowerShell is a powerful open-source, cross-platform task automation and configuration management solution originally developed by Microsoft. Built on the .NET framework, PowerShell combines the best features of popular shells, providing a modern command shell experience.
One key aspect that sets PowerShell apart from traditional shells is its ability to accept and return .NET objects rather than just text. This functionality allows users to harness the power of .NET libraries when scripting, making complex tasks and automation more streamlined.
In recent updates, such as Windows 11 22H2, the default app used to host console windows has been changed to Windows Terminal. This means that Command Prompt, Windows PowerShell, WSL, and other console apps can now run within an instance of Windows Terminal!
Wide range of customizable scripts and commands suitable for different IT and development needs. It’s built on a Command Line Interface (CLI) that lets you automate repetitive tasks, manage remote machines, etc., using code.
Includes an integrated scripting environment (ISE) which serves as a user interface for creating, editing, and executing PowerShell scripts and commands. You can also use common Integrated Development Environments (IDE), like Visual Studio Code, to create and run PowerShell scripts.
Supports modules and command sets that are reusable and follow a common structure. These modules enhance its functionality and enable users to create and deploy specific solutions tailored to their requirements.
Features Desired State Configuration (DSC), which is a management tool within the solution that allows users to define, deploy, and maintain consistent configurations across various environments.
Additionally, the security features within PowerShell ensure that scripts and cmdlets are executed in a secure environment. It has a robust permissions system and supports various security protocols, including Secure Shell (SSH) for remote access.
This makes PowerShell an ideal tool for managing and automating numerous administrative tasks across local and remote systems.
This includes Azure, Microsoft’s cloud computing service, which has a dedicated Azure PowerShell module for automating tasks related to Azure resources.
Now that we’ve gone over the basics, let’s discuss how you can install and set up PowerShell in the next section!
To get started with PowerShell, you can download the appropriate version for your operating system from various official repositories. Microsoft and other communities also provide extensive resources that you can use to learn how to use PowerShell effectively.
First, let’s look at how you can install it on different operating systems.
Supported versions of Windows provide multiple ways to install PowerShell. Each method supports different scenarios and workflows. Choose the method that best suits your needs.
Some of these methods include:
For Windows clients, the recommended way to install PowerShell is by using Winget. It’s a package manager that comes bundled with Windows 11 and certain versions of Windows 10.
To install PowerShell with it Winget, follow these steps:
Open Command Prompt by using the Windows + R shortcut, then typing cmd in the box.
Next, type the following command into the cmd window to search for the PowerShell package.winget search Microsoft.Powershell
The command will return the latest versions of PowerShell available. You can install either of them using either of the two commands below.winget install --id Microsoft.Powershell --source winget winget install --id Microsoft.Powershell.Preview --source winget
The first command will install the latest stable version of PowerShell on your machine, while the second will install the Preview(beta) version on your PC.
You can download Powershell’s MSI package from GitHub and install it on your machine just like any other program. Here is a link to the package release page.
Once you download the right version for your PC, install it. Then, once the installation is complete, you’ll be able to access the app through the start menu.
This method is best for beginners because it’ll automatically update PowerShell regularly and ensure that you always have the latest stable version installed on your computer.
However, you should know that using this method will run PowerShell in an application sandbox that virtualizes access to some systems. Changes to the virtualized file system won’t persist outside of the sandbox.
PowerShell can also be installed on macOS. Here’s a brief overview of the two main PowerShell installation processes for achieving this in Apple devices:
Homebrew is macOS’s native package manager, and you can easily use it to install Powershell from the command line. Here’s how:
Open up the terminal. Make sure you have Homebrew installed.
To install the latest stable version of PowerShell, run the command belowbrew install --cask powershell
To install the preview version, run the following commands:brew tap homebrew/cask-versionsbrew install --cask powershell-preview
To update PowerShell, you can run either of the commands:brew update brew upgrade powershell--cask This update the stable versionbrew update brew upgrade powershell-preview --cask This will updtae the rpreview version
PowerShell can be installed on various Linux distributions. To get started, visit the official PowerShell installation page from Microsoft and follow the instructions for your specific distribution.
After completing the installation on your chosen platform, you can start using PowerShell by launching the corresponding command-line application.
On Windows, you can launch PowerShell from Windows Terminal or the start menu.
On macOS and Linux, you can launch it from the Terminal by running the pwsh command.
In this section, we’ll explore the features and functionalities of PowerShell. This versatile tool has revolutionized task automation and configuration management in Windows environments, but its potential applications extend far beyond these domains.
A cmdlet is a single, lightweight command used to perform tasks in a PowerShell environment. They are specialized .NET classes that perform tasks by accessing data stores, processes, or other system resources.
After performing the tasks, they return a .NET object that can be piped into another cmdlet. PowerShell provides a robust command-line interface with history, tab completion, and command prediction.
It utilizes commands and cmdlets to perform tasks in the command prompt. A common example is the Test-Connection cmdlet used to test a PC’s connectivity.
You can also check out this cmdlet for creating a new directory using PowerShell.
A PowerShell function is another way of running commands in PowerShell, similar to cmdlets. It’s made up of PowerShell statement(s) intended to perform a specific task, grouped under a specific name.
To run the function, all you have to do is to call the function name on the cli. Just like cmdlets, functions can also take in parameters and return data.
Functions are very helpful for performing repetitive tasks in PowerShell. With them, you can write the task’s logic once in the function and call it several times.
Here’s an example of a simple function that takes in your name and greets you:
function Get-Name { param( [string] $name ) Write-Host "Hello $name!" }PowerShell includes a powerful scripting language built on .NET Core, allowing users to create scripts and automate tasks.
Users can define functions and classes to encapsulate reusable logic within a PowerShell script or define complex data structures.
Using scripts and automation helps streamline administration tasks and manage systems more efficiently.
Modules are a way to organize and distribute PowerShell tools. They are self-contained packages containing cmdlets, functions, aliases, providers, and other resources required for their functionality.
Users can import modules to extend the functionality of PowerShell, making it a highly extensible platform. For example, you can install Power Bi cmdlets on Windows PowerShell.
You can learn how to do this in our video on How To Install And Use Windows PowerShell Cmdlets For Power BI:
PowerShell Desired State Configuration (DSC) is a configuration management platform built on PowerShell.
It allows administrators to define the desired state of a system and automates the process of bringing the system to that state.
DSC uses a declarative syntax called configuration to describe the desired state and ensures systems remain compliant with desired configurations. You can use the Get-DscResource cmdlet to get the available resource.
Azure PowerShell is a set of modules that enable administrators to manage Azure resources through PowerShell cmdlets.
It provides a simplified and automated way to perform administration tasks within Azure environments.
Users can easily manage virtual machines, storage accounts, databases, and other Azure resources using the familiar PowerShell language.
PowerShell remoting provides a means for system administrators to run PowerShell commands on remote machines. Using this feature, they can retrieve data, run commands or configure one or more machines across a network.
To run commands remotely, PowerShell supports many remoting protocols such as SSH, RPC (Only Windows), WMI, and WS-Management.
Windows PowerShell Integrated Scripting Environment (ISE) is a graphical host application for Windows PowerShell. It provides a user-friendly interface to work with PowerShell scripts and commands.
ISE facilitates the creation, execution, debugging, and testing of PowerShell scripts in a single Windows-based graphical user interface (GUI). It offers several features, such as:
Syntax coloring: Color-coding for different elements in scripts, like commands, parameters, and variables, enhancing readability.
IntelliSense: Auto-completion of commands and parameters based on the context, reducing the possibility of errors.
Tabbed Interface: Multiple script tabs for working on various files simultaneously.
Split-pane view: Script Pane and Console Pane are displayed side-by-side, allowing users to write and execute scripts concurrently.
Context-sensitive help: Quick access to relevant help documentation based on the current selection.
While ISE was the primary PowerShell development environment in the past, it’s important to note that it is now in maintenance mode.
Microsoft recommends using Visual Studio Code with the PowerShell extension for a more feature-rich and updated experience.
Writing a script in ISE is quite easy. Here’s how you can write a simple ISE script:
Open the PowerShell ISE. To do that, type in the following:powershell_ise
In the console that opens, type in the followingWrite-Host 'Hello Powershell world!'
Save the file somewhere on your PC. Make sure you remember the file path.
Note: To run scripts on your machine, you might need to change the Execution Policy first. The default policy restricts scripts from running on your local machine, so you will need to change it to RemoteSigned.
You can do this by running this command below in PowerShell or cmd admin:
Set-ExecutionPolicy RemoteSignedIn the menu that comes up, select Y to change the policy.
Debugging and testing scripts are essential for ensuring functionality and efficiency. Windows PowerShell ISE provides useful debugging features to simplify the process:
Breakpoints: Set breakpoints to pause script execution at specific lines, making it easier to identify issues within the script.
Step-through debugging: Execute the script line by line or step over functions and modules to observe script behavior.
Variable monitoring: In the interactive console, inspect and modify variables to observe changes in script output.
Error indication: Highlighting errors in the script, with explanations and suggestions on how to fix them.
ISE’s integrated features allow users to quickly identify problems, test solutions, and verify script functionality before deploying it in a production environment.
In an era where cybersecurity is of paramount importance, understanding and implementing security best practices for any computing platform or language is crucial. PowerShell, a powerful scripting language and automation framework from Microsoft, is no exception.
This section will delve into the comprehensive approach towards security considerations for PowerShell, focusing on strategies to harden the environment, secure scripts, and minimize potential attack vectors.
PowerShell’s execution policy is a safety feature that controls the conditions under which configuration files and scripts are loaded and executed. This helps prevent the execution of malicious scripts.
You can also use Group Policy settings to set execution policies for computers and users, but these policies only apply to the Windows platform. To enhance security further, always ensure to sign your scripts after having them vetted before importing them for usage.
Managing PowerShell modules effectively is essential for both security and functionality. The SecretManagement module, for example, provides a useful way to store and manage secrets (like API keys and credentials), while preventing unauthorized access.
To manage your modules, consider the following best practices:
Use a version control system (e.g., Git) to track and manage module changes
Regularly update your modules to receive the latest security patches and features
Use PSScriptAnalyzer to examine your modules for potential issues and follow its recommendations
When writing PowerShell scripts, adhering to best practices can improve security, maintainability, and performance. A few key practices to follow include:
Abstract away concepts as much as possible to simplify your scripts.
Avoid creating a parameter if you can come up with the value in the code.
Restrict the user from running unnecessary commands if they don’t have to
Use PSScriptAnalyzer to analyze your scripts and improve their quality
PowerShell is a powerful tool for system administration and automation. To help you learn and master PowerShell, it’s essential to be aware of the various resources and community platforms available.
In addition to Microsoft’s official resources, the PowerShell community plays a significant role in its development and support. This section will provide you with information on official documentation, community websites, and forums, as well as social media and community interactions.
PowerShell Gallery: The PowerShell Gallery is a central repository for PowerShell modules, making it easy to find useful scripts and tools shared by fellow PowerShell developers. It’s also a reliable platform for publishing your own modules.
chúng tôi : chúng tôi is a community-driven, non-profit organization dedicated to promoting PowerShell education. They provide free resources, including webinars, ebooks, and articles.
Tech Community: The Microsoft Tech Community is a forum where you can ask questions, share insights, and learn from industry experts on a wide array of Microsoft products, including PowerShell.
Stack Overflow: On Stack Overflow, PowerShell developers can ask and answer questions, helping each other solve scripting challenges.
r/PowerShell: The r/PowerShell subreddit is a popular forum where PowerShell users share scripts, solutions, and best practices.
Slack: A dedicated PowerShell Slack workspace hosts community discussions and allows users to collaborate on projects.
Discord: The PowerShell Discord server serves as yet another platform for users to engage in conversations, ask questions, and share resources.
Spiceworks: This PowerShell community on Spiceworks covers topics related to PowerShell, offers tips, tricks, and shares scripts.
GitHub: Many PowerShell projects are hosted on GitHub. You can find repositories with useful scripts, tools, and modules, as well as contribute to open-source initiatives.
As we wrap up our exploration of PowerShell, it becomes clear that this scripting language is an essential component of modern IT environments. With its rich set of features, PowerShell empowers users to tackle complex tasks with ease.
From system administration to managing cloud resources, PowerShell provides the flexibility and control needed to navigate the ever-evolving technological landscape.
Whether you’re a seasoned IT professional or a beginner, learning PowerShell opens up a world of possibilities for streamlining operations and maximizing productivity.
Fancy learning more about PowerShell? Check out this great article on PowerShell Global Variables.
Some common commands work, while others do not. Commands like touch, sudo, ifconfig do not work in PowerShell.
However, commands like ls, pwd, echo, rm, etc., work in PowerShell.
Some basic PowerShell commands include:
Get-ChildItem lists items in a directory
New-Item creates a new item, such as a file or directory
Remove-Item deletes an item
Rename-Item changes the name of an item
You can check out more cmdlets in this article on 10 PowerShell Examples You Need to Know. You can also list all the commands installed on your machine using the Get-Command cmdlet.
PowerShell comes pre-installed in Windows 10 and 11. You can open it as mentioned in the “How to Install and Set Up PowerShell” section.
Update the detailed information about Parameterization, Functions, Transactions In Loadrunner on the Daihoichemgio.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!