Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Software & Coding Articles
Page 68 of 83
How to Zip / Unzip files or folders using PowerShell?
Now it is easy to ZIP or extract (unzip) the files or folders using PowerShell. PowerShell has added features of the Archive module (Microsoft.PowerShell.Archive) from PowerShell 5.1 version.If you have PowerShell older version (version 4.0 or less) then you can download and install the module from the website or through the command line. However, only download and installing or manually copying the Archive module to the Module folder won’t work because it needs some dependent DLL files which are provided by .Net framework 4.5 so you need to consider upgrading .Net framework as well if it is below the 4.5 ...
Read MoreHow to create a User Menu in PowerShell?
When you are writing a script and if you want to provide the user to select one option among multiple values and based on it to execute the command, we can generally use the Switch command and for it, we will ask the user choice in the below script.There is another .Net method to create a user menu, we will see it after the example from the description mentioned above.a. Switch command methodFor the Switch command-based user selection, we will first display the message for the user and then give him a choice for the selection through Read-Host command as ...
Read MoreHow to get website SSL certificate validity dates with PowerShell?
SSL certificates are a very crucial part of the website. They play a key role in securing the exchange of information on both client and server sides by activating an HTTPS secure connection. In the below article with the PowerShell, we will get the certificate validity date (starting and expiry date) for the certificate using PowerShell.To achieve this, we need to make httpwebrequest but before that, we will ignore SSL warning by the below command.[Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }And then we wil make the HTTP web request by calling a .Net class.$url = "https://www.microsoft.com/" $req = [Net.HttpWebRequest]::Create($url)When we check the ...
Read MoreWhat are the differences between Unix and Linux Operating System?
UNIX copyrighted Operating system which is used by IBM AIX, Sun Solaris and HP-UX etc., Most of the UNIX systems are commercial in nature.Linux is considered as UNIX clone. But the traditional companies won't accept "Unix-like" but want the Unix trademark. Linux Is Just a Kernel and not the complete Operating system.When it comes to administration, Linux is considered as most user-friendly operating systems. Unix and Linux use a different set of tools for back up of data. However, they both share some common tools such as tar, dump/restore, and cpio etc.
Read MoreWho are currently the best programmers in the world?
Programming or software coding is not an easy task. Dennis MacAlistair Ritchie was an American computer scientist who is credited with being the all-time best programmer for his pioneering work towards shaping the digital era. He is the creator of the most used C programming language and UNIX Operating system.Let’s see who is currently reigning in the world as best computer programmers for the year 2017-2018.Bill Gates (Microsoft co-founder)James Gosling (Java Creator)Richard Stallman (GNU Project Creator)Bjarne Stroustrup (C++ Creator)Tim Berners-Lee (HTML and WWW inventor)Ken Thompson (UNIX Co-Creator)Linus Torvalds (Linux Kernel Creator)Dennis Ritchie (C Programming language creator)Jack Dorsey (Twitter Creator)Ruchi Sanghvi ...
Read MoreWhat are free options available to generate closed captions from Audio/Video?
There are some free options available to generate closed captions from Audio/Video.Amara − Amara is one such tool. It is very easy to learn and provides the best platform to create captions from scratch.Youtube − Youtube is the most popular tool which is available for free. It has great features to create captions.Subtitle Edit − This is a free tool which has to be downloaded on your laptop and desktop and you can start using it even offline.
Read MoreWhat is the difference between a white box, black box, and gray box testing?
When you develop a web application, before hosting to the web, testing is very important to prevent the hackers. There are three types of tests, Black, gray and white box tests which are conducted to ensure that an attacker cannot reach your application code.White Box (or glass box) testingWhite Box (or glass box) testing is the process of giving input code to the system and checking how the system processes it how the output is generated using that code. This is the test where the team tests the internal logic of the code written.It is the process of checking how ...
Read MoreDifference between Synthesized and Inherited Attributes
Both Synthesized and Inherited Attribute are the part of semantics of a language that provide meaning to its constructs, like tokens and syntax structure. Semantics help interpret symbols, their types, and their relations with each other and its analysis judges whether the syntax structure constructed in the source program derives any meaning or not. Now on the basis of features of attributes we can distinguish between Synthesized and Inherited AttributesFollowing are the important differences between Synthesized and Inherited Attributes.Sr. No.KeySynthesized AttributeInherited Attribute1DefinitionSynthesized attribute is an attribute whose parse tree node value is determined by the attribute value at child nodes.To ...
Read MoreExplain Try/Catch/Finally block in PowerShell
Try/Catch block in PowerShell is to handle the errors which are produced in the script. To be specific, the errors should be terminating errors. The Finally block in the PowerShell is not mandatory to write each time along with Try/Catch but it will be executed regardless the error occurs or not.So when you use the Try block, the Catch block is mandatory but not Finally block.Try/Catch block with Terminating error − Below is the example of Terminating error without finally block.Exampletry{ This is not allowed "This is Allowed" } catch{ Write-Host "Error occured" -BackgroundColor DarkRed }OutputPS C:\WINDOWS\system32> ...
Read MoreHow to use the ErrorActionPreference variable in PowerShell?
ErrorActionPreference variable in PowerShell is to control the non-terminating errors by converting them to terminating errors. Error handling depends upon which value you assign to $ErrorActionPreference variable.The values are as below.Continue − This is the default value of the variable and when the error occurs, an error is displayed in the PowerShell console, and the script continues the execution.Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist Write-Host "Hello World"Output Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist Write-Host "Hello World" Get-WmiObject : The RPC server is unavailable. At line:2 char:1 + Get-WmiObject -Class Win32_Logicaldisk -ComputerName Nonexist + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException + FullyQualifiedErrorId ...
Read More