Windows power shell using techniques.

What is the PowerShell.

Power is a cross-platform task automation solution.

Create for command-line shell, a scripting language, and a configuration management framework.

This runs on Windows, Linux, and macOS.

How to install the Windows PowerShell.

Using this link, we can download.

https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-7.1.

The three main reasons to why we should use Power when we are working.

  • Automate redundant tasks.
  • Manage IT environments at scale.
  • Access hard-to-find user information.

Most common command for the Power Shell.

When we first time working with this scripts, this might not work. 

Because of the some policies it will avoid the execution.

And then get some restriction process output such as,

Restricted— No scripts will be executed. The default setting in Windows, so you will need to change them all. 

AllSigned— You can only run scripts signed by a trusted developer. You will prompt the before running any scripts of the computer.

RemoteSigned— You can run your own scripts or scripts signed by a trusted developer. 

Unrestricted— You can run any script you want. This option should not be used, for obvious reasons.

We can using PowerShell to compress files in a new zip.

All you need to do is use the 

Path and Destination path.

Compress-Archive -Path C:\Myfolder -DestinationPath C:\Archives\Myfolder
Compress-Archive -LiteralPath C:\ Myfolder\File1.txt, C:\Myfolder\File2.txt -DestinationPath C:\Archives\Myfolder -Force

Compress-Archive -Path C:\Invoices\* -Update -DestinationPath C:\Archives\Invoices
Expand-Archive -LiteralPath C:\Archives\Invoices.Zip -DestinationPath C:\ InvoicesUnzipped
Windows power cell using techniques

CV .

Leave a Reply

Your email address will not be published. Required fields are marked *