- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Chirag Nagrekar has Published 465 Articles
Chirag Nagrekar
1K+ Views
Transcript in Powershell is like a recording session. So whenever you start a transcript in PowerShell, it starts recording your commands and outputs and doesn't matter if there is any error output, it gets recorded too. To start the transcript, you need to run Start-Transcript command at the beginning, and ... Read More
Chirag Nagrekar
12K+ Views
Reading the XML file in PowerShell is easy. We have the below XML file for our example, Example Forest Brown Street ... Read More
Chirag Nagrekar
13K+ Views
To pass the argument in the Invoke-command, you need to use -ArgumentList parameter. For example, we need to get the notepad process information on the remote server.ExampleInvoke-Command -ComputerName Test1-Win2k12 - ScriptBlock{param($proc) Get-Process -Name $proc} - ArgumentList "Notepad"OutputHandles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName PSComputerName ------- ------ ----- ----- ------ -- -- ----------- -------------- 67 ... Read More
Chirag Nagrekar
519 Views
To format string in PowerShell, you can use -F operator. When you use -F format, you need to provide the argument number in the curly brackets.ExamplePS C:\> $Str = "Hello PowerShell" PS C:\> "{0}" -f $str Hello PowerShellFor the multiple values, PS C:\> $Str = "Hello PowerShell" PS C:\> $str1 ... Read More
Chirag Nagrekar
4K+ Views
There are several ways to find the MAC address (Physical Address) of the system using PowerShell.Using the Get-NetAdapter commandUsing this command, we can retrieve the MAC address of the network adapter.Using GetMac commandIpconfig commandWe need to use Ipconfig /all to retrieve the mac address of all the adapters.ExampleIpconfig /all | ... Read More
Chirag Nagrekar
15K+ Views
To resolve the DNS address using PowerShell, we need to use the Resolve-DNS address command. This command works similarly to Nslookup command.To resolve the A record (Name -> IP), you can directly provide the hostname and by default, it will retrieve all the records for the particular address.ExampleResolve-DnsName -Name Test1-win2k12OutputName ... Read More
Chirag Nagrekar
794 Views
To install the active directory module using PowerShell, you need Remote Server Administrator Tools (RSAT) on the server. It should be available in the Roles and Features section of the windows server operating system as shown below and you can enable it from the GUI as well.If you can’t find ... Read More
Chirag Nagrekar
1K+ Views
We know that PowerShell executes commands sequentially until we specify some parallel Jobs but sometimes the next command executes before the First command because the first command might be taking a long time to retrieve the data. In that case, if you want the previous command to finish first and ... Read More
Chirag Nagrekar
849 Views
To get the timezone of the System, you can use the Get-TimeZone command.ExamplePS C:\> Get-TimeZone Id : Mountain Standard Time DisplayName : (UTC-07:00) Mountain Time (US & Canada) StandardName ... Read More
Chirag Nagrekar
396 Views
Like the Parameter alias, we can also set the function alias name to refer to the function as a different name.Examplefunction Test-NewConnection{ [CmdletBinding()] [Alias("TC")] param( [Parameter(Mandatory=$true)] [String]$Server ) Write-Output "Testing $server connection" }Now, instead of the Test-NewConnection function name, ... Read More