Connect with us

This comprehensive guide covers essential PowerShell information, including features, system requirements, and how Microsoft’s framework extends to task automation and management.

Image: Microsoft

PowerShell was developed more than 10 years ago by Microsoft to expand the power of its command line interface (CLI) by coupling it with a management framework that is used to manage local and remote Windows, macOS, and Linux systems. By making use of the Component Object Model (COM), Windows Management Instrumentation (WMI), and Common Information Model (CIM) interface standards, PowerShell allows for managed elements of computing objects to be administered independent of the manufacturer or provider.

This cheat sheet will be updated when Microsoft releases new information throughout PowerShell’s development lifecycle.

SEE: Manage Active Directory with these 11 PowerShell scripts (TechRepublic Premium)

Executive summary

  • What is PowerShell? Microsoft’s PowerShell is a management framework that combines a command-line shell and scripting language that is built upon the .NET framework for native Windows support or the .NET Core framework (which is open source), providing cross-platform support for Windows, macOS, and Linux.
  • Why does PowerShell matter? PowerShell is capable of automating management tasks and functioning as a dedicated scripting language for both Microsoft- and non-Microsoft-based software. Also, PowerShell includes commands called cmdlets that add functionality to the core foundation, while providing a means to upgrade/update cmdlets to further augment functionality in the future versions.
  • Who does PowerShell affect? Companies relying on Microsoft, Apple, and Linux services to empower their business functions, and the IT professionals who are responsible for managing this infrastructure.
  • When is PowerShell available? PowerShell 5.1 (.NET) is closed source, the most recent version available, and supported for Windows-based systems. PowerShell 7 (.NET Core) is open source and the most recent version available, supporting Windows, macOS, and Linux operating systems. On Windows systems only, both versions may exist side by side without conflict.
  • How can I get PowerShell? PowerShell 5.1 (.NET) is a natively installed application that is part of all Windows client and server OSes; by default, the application can be updated directly from Microsoft’s downloads website or through Microsoft Updates. You can get the latest version, PowerShell 7 (.NET Core), by visiting Microsoft’s GitHub website for PowerShell and downloading the version that supports your operating system; this version of PowerShell may also be downloaded and updated via the native CLI of the operating system.

SEE: Top 5 programming languages for security admins to learn (free PDF) (TechRepublic)

What is PowerShell?

Released as PowerShell 1.0 on November 14, 2006, Microsoft developed PowerShell to address the shortcomings of its DOS-based CLI, particularly when managing objects using complex scripting languages.

By creating a new shell from the ground up, Microsoft effectively developed an extensible environment that would be powerful and flexible–it’s capable of automating management tasks and functioning as a dedicated scripting language for Microsoft-based software.

Through various revisions, PowerShell has added modules to extend functionality to new objects as well as introduce new cmdlets for managing more resources, including Active Directory and Exchange Server. On August 18, 2016, Microsoft announced that PowerShell was going open source and provided its source code to the public, adding support to Unix-based OSes, including Linux distros and OS X.

SEE: All of TechRepublic’s cheat sheets and smart person’s guides (TechRepublic)

PowerShell 7 is the newest version of PowerShell and serves as a replacement console to both the previous versions of PowerShell Core 6.x and the Windows-only PowerShell 5.1. The latter serving as the last supported version of the Windows-only version of PowerShell, with the development team’s aim being to condense all previous versions of PowerShell into one beginning with 7.0. This move, which is currently underway, will slowly bring PowerShell 7 into compatibility with previously unsupported cmdlets, further bringing it closer to parity for all supported operating system versions.

PowerShell includes a number of cmdlets with which to manage any number of system attributes, resources, and objects–far beyond the scope of this guide. The following are some of the most notable features, modules, and cmdlets.

  • Active Directory (module): This module is used by PowerShell to extend management capabilities to Active Directory objects, including computers, users, and groups and attributes stored within accounts.
  • Exchange Server (module): This module is used by PowerShell to enable full administration of Exchange Servers. Included within the module are additional cmdlets that fully support all aspects of your Exchange email server.
  • Get-Help (cmdlet): This built-in cmdlet within PowerShell core provides helpful information, including syntax use and examples of commands and what they accomplish.
  • Get-Command (cmdlet): When executed, this built-in cmdlet within PowerShell core provides a list of commands that are available. It’s useful in identifying which commands are available for each module.
  • Set-Variable (cmdlet): This built-in cmdlet within PowerShell allows the user to create variables used to store data, such as file paths, multiple objects, or snippets of code you wish to reuse.
  • Invoke-Command (cmdlet): This built-in cmdlet within PowerShell calls upon another cmdlet, usually run from a local computer, to execute the invoked command on remote computers.
  • Pipeline ( | ): One of the features of PowerShell is the ability to chain commands together by means of the pipe character. Piping commands causes PowerShell to run the first part of the command and then output the results for use by the second command and so on until the entire sequence is run. It is useful when performing a multiple-step task, such as creating a username, adding the username to a security group, and resetting the default password.
  • Function ( { } ): Similar to the pipeline feature in that cmdlets may be linked together, functions allow for greater control over the scripting process. By wrapping cmdlets in braces, a function is created that serves to run the sequence one or more times.
  • Out-File (cmdlet): This built-in cmdlet within PowerShell allows a command’s output to be exported to a file. Typically used with the pipe feature, a user can get a list of user accounts that are disabled in Active Directory, for example, and export that list to a text file for future use.
  • Import-Module (cmdlet): This built-in cmdlet within PowerShell imports one or more modules into PowerShell to further its feature set, cmdlets, and functionality.
  • 3rd-party Modules: Software developers can program code to group multiple cmdlets together as 3rd-party modules that are imported into PowerShell to extend functionality and support for specific applications. Notable 3rd-party modules exist from VMware (virtualization), Dell (PowerEdge servers), and PowerSploit (Security/Pentesting).

Current minimum system requirements for PowerShell 7

  • x64-based processor and operating system
  • Ubuntu LTS 16.04 or 18.04    
  • CentOS 7 or 8
  • Arch Linux
  • Kali Linux
  • Alpine Linux 3.8
  • Fedora 30
  • Debian 9 or 10
  • openSUSE 42.3
  • macOS 10.1
  • Windows 8.1 or 10
  • Windows (ARM)
  • Raspbian (ARM)
  • Docker
  • Internet: Broadband access (optional)

Additional resources

Why does PowerShell matter?

Until the release of Windows 95, Microsoft chose to run Windows over DOS since it was the de facto OS in use on IBM-compatible computers. From Windows 95 on, Windows kept MS-DOS since some legacy applications still relied upon it.

MS-DOS also served as the means of administering devices through remote methods and by way of scripts that would be coded to automatically run tasks that were deemed repetitive and time-consuming to manage Windows computers.

MS-DOS was released in 1981, and Microsoft did not evolve its CLI (unlike its Unix-based competitors) until the initial development of PowerShell in 2006. In making this 25-year leap, PowerShell was designed as more than just a CLI replacement.

Microsoft created PowerShell as a management framework that combines both a command-line shell and scripting language that is built upon .NET and the .NET Core and used as a software framework to standardize code, develop powerful applications, and cross-platform management of systems in heterogenous networks.

This results in PowerShell being used to manage hardware, software, and network objects at the command line, while also allowing programmers to use its scripting capabilities to interface with any manageable attributes to share data between them–including outputting code to develop applications to scale–from one personal computer through large enterprises that span the globe.

Open sourcing PowerShell allows for a cross-pollination of system administrators to manage multiple types of server OSes from just about any system–for example, managing Windows servers from macOS or maintaining Linux servers from Windows client machines. This level of flexibility is unprecedented and will be useful with standardizing management of different platforms across industries, especially when it comes to automating system management processes, as PowerShell 7 scripts created on Linux systems will work identically on macOS and Windows systems, easing administrative overhead.

Additional resources

Who does PowerShell affect?

PowerShell affects all types of users, from end users looking to be more productive to administrators seeking a simpler, more powerful solution to manage devices locally and remotely to developers writing their own applications to interface between hardware and software layers. PowerShell is the next step in Microsoft’s CLI evolution, but also presents a major step towards unifying management processes across platforms that were previously quite disparate from one another.

PowerShell does require learning new commands, new syntax, and logic in order to reach its maximum potential. And yet, Microsoft is already bringing this point home through the use of PowerShell modules that serve to integrate with enterprise applications such as Exchange, SQL, and Windows Server to extend functionality and manageability.

Adding to this is the explosive growth of cloud-based services, such as Azure from Microsoft. With many of the management features available via GUI from the web-based interface, PowerShell 7 adds management support through Azure modules, further allowing administration of cloud-based infrastructure, including Azure Active Directory, among many other resources through the CLI.

Prior to the shift to open source, PowerShell affected only Windows administrators and those using the Microsoft family of products; however, now Linux and macOS administrators may option the ability to leverage PowerShell’s open-source capabilities alongside Microsoft administrators to simplify management.

Additional resources

When is PowerShell available?

PowerShell has been available for use on Windows computers since 2006. Beginning with version 1.0, PowerShell was made available to Windows XP SP2, Windows Vista, Windows Server 2003, and 2008.

PowerShell 2.0 was an upgrade to Windows XP SP3, Windows Vista SP1, and Windows Server 2003 SP2. It came integrated with Windows 7 and Windows Server 2008 R2.

PowerShell 3.0 was an upgrade to Windows 7 SP1 and Windows Server 2008 SP1 and 2008 R2 SP1. It came integrated with Windows 8 and Windows Server 2012.

PowerShell 4.0 was an upgrade to Windows 8, Windows 7 SP1, Windows Server 2008 R2 SP1, and 2012. It came integrated with Windows 8.1 and Windows Server 2012 R2.

PowerShell 5.0 is an upgrade to Windows 8.1, Windows 7 SP1, Windows Server 2008 R2 SP1, and 2012 R2. It comes integrated with Windows 10 and Windows Server 2016.

PowerShell 5.1 (.NET) is currently only available via the Windows 10 Anniversary Update.

PowerShell 7 is the most recent version available, based on the .NET Core framework. It was made available to the public on March 4, 2020, and currently supports Windows (x86/x64), Ubuntu 16.04/18.04, Debian 9/10, CentOS 7/8, RHEL 7, openSUSE 42.3, Fedora 30, macOS 10.13+, and Docker.

PowerShell 7.0.3 is the current, stable version; it was released on July 6, 2020.

Additional resources:

What are alternatives to PowerShell?

These are some of the alternatives to PowerShell.

How can I get PowerShell?

PowerShell is integrated on all versions of Windows going as far back as Windows 7. It is also integrated on all versions of Windows Server going as far back as Windows Server 2008 R2.

Previous versions of Windows can run PowerShell, though it is available as an optional update and not integrated with the operating system as is the case in more recent versions.

To install or upgrade to the 5.1 version of PowerShell on Windows computers, the latest Windows Management Framework (WMF) installer must be downloaded. The version number on the WMF installer directly matches the version of PowerShell that will be installed. Currently, WMF 5.1 exists and may be downloaded from Microsoft’s website free of charge for Windows users.

To install or upgrade to the open source version of PowerShell 7 on supported systems, such as macOS and Linux, visit the PowerShell GitHub repository to obtain the appropriate package that matches the target operating system. Additionally, the latest versions of PowerShell 7 may be installed using the system’s native CLI by entering the respective system’s command with administrative credentials.

SEE: Top 5 programming languages for systems admins to learn (free PDF) (TechRepublic)

How do I use PowerShell?

TechRepublic has published a number of tutorials on how to get the most out of PowerShell. Check out these tips, as well as some PowerShell basics from Microsoft.

Editor’s note: The author updated this article with the latest information about PowerShell.

Source link

Continue Reading


WD My Passport SSD (2020) Review

wd my passport ssd front 1604073135378

WD’s latest round of redesigns has spread throughout its portable storage lineup, replacing the bold, bright, sharp design-led identity with rounded edges, muted colours, and simpler plastic bodies. Whimsy has given way to practicality, which you might or might not be in favour of. The latest reimagined storage device is the WD My Passport SSD (2020), but in this case, the changes aren’t solely cosmetic. You get a huge bump in hardware specifications and speeds, keeping WD’s portable SSD lineup current and competitive. Here’s a review of the brand new WD My Passport SSD (2020).

WD My Passport SSD (2020) design and features

The older two-tone metal-and-plastic design might have been slightly impractical with its sharp corners and overall bulk, but it looked and felt very modern and premium. Now, you get a much more organic body, shaped somewhat like a thin bar of soap. It’s much flatter than before, with rounded sides and corners that make for an easy grip. This device will be comfortable in your hand as well as your pocket. It weighs only 45.7g.

The body is made of metal and there’s a swirly ridged pattern on the front as well as the rear. The USB Type-C port is off-centre on the bottom and there’s no activity LED. The raised WD logo feels rough and looks rather garish, but otherwise this is a simple, sober design that will fit in anywhere. You have a choice between Space Grey, Midnight Blue, and Gold. A red version appears to be available in other countries, but isn’t listed here.

The WD My Passport SSD (2020) weighs 45.7g


Unlike some other portable SSDs (including models from Western Digital’s other brands, SanDisk and G-Technology), there’s no waterproofing or other form of protection from the elements. WD does mention shock and vibration resistance, which are inherent to SSDs, plus drop resistance for falls from up to 1.98m in height.

Perhaps unsurprisingly, the My Passport SSD (2020) is very similar in shape and size to the SanDisk Extreme V2 portable SSD, but doesn’t have an integrated handle, ruggedised coating, or IP rating.

You get a very short USB Type-C cable in the box, with a Type-C to Type-A adapter for broad compatibility. As we noted with the previous incarnation of the My Passport SSD, such an adapter is technically outside the official USB specification and so the cable and adapter both have notches to make sure they’re used with each other. That doesn’t physically stop you from using the entire cable, plus adapter, with another device though. This should be avoided, because some devices need to negotiate things like how much power is sent from one side to another, which cannot happen through a legacy USB port when such an adapter is used.

WD My Passport SSD (2020) price, specifications and performance

The biggest upgrade comes from the use of an NVMe SSD and bridge rather than the older SATA protocol. WD claims read and write speeds of 1050MBps and 1000MBps respectively – exactly the same as the Samsung SSD T7 Touch, and in line with the Sandisk Extreme Pro. You’ll need a PC with a USB 3.2 Gen2 (10Gbps) or Thunderbolt 3 port to be able to harness such speed.

The new My Passport SSD (2020) is available in 500GB, 1TB and 2TB capacities, priced officially at Rs. 8,999, Rs. 15,999, and Rs. 28,999 respectively. They are exclusive to Amazon during the festive sale period, and actual prices are quite a bit lower. They will be available offline from mid-November. 

wd my passport ssd port ndtv wd

There’s a USB Type-C port on the bottom but no status LED


WD has implemented 256-bit AES hardware encryption. The company offers quite a lot of free software that you can download, including the capable Drive Utilities for general maintenance, WD Backup to set up simple backup routines, and WD Security to set up encryption with a password. You’re also encouraged to install WD Discovery, which is completely unnecessary and only exists to serve up ads and promotions for WD.

The 1TB review unit we’re testing today was formatted to exFAT by default. This works cross-platform, but if you’re planning to use Time Machine on a Mac, you’ll need to reformat the drive to HFS+ (or at least partition and format some of it). Windows’ Disk Management console reported 931.48GB of usable space.

All tests were run on an HP Spectre x360 13 laptop because of its Thunderbolt 3 ports. CrystalDiskMark 6 reported sequential read and write speeds of 913.9Mbps and 924.9Mbps respectively, which is not too far below WD’s official claim. More realistic random read and write speeds were 154.1Mbps and 163.8MBps respectively. While good by portable SSD standards, the My Passport SSD (2020)’s scores lag quite a way behind what the Samsung SSD T7 Touch and SanDisk Extreme Pro were able to achieve. The Anvil benchmark managed read and write scores of 2,186.6 and 1,921.12, for an overall score of 4,107.72.

The shell of the WD My Passport SSD (2020) did get quite warm when benchmarks were running and when large batches of files were being copied up and down in testing. This shouldn’t be much of a problem in everyday use, and there’s nothing else to complain about.

wd my passport ssd cable ndtv wd

You get a small USB Type-C cable with a Type-A adapter



If you like bold, edgy design and products that make a statement, the new WD My Passport might be a bit of a disappointment. It looks unassuming and pedestrian compared to its predecessor; more like a bar of soap than a high-end tech product. Perhaps this is a signifier that portable SSDs aren’t just lifestyle accessories for only those who can afford them anymore, but are now perfectly mainstream commodity products.

The emerging new class of NVMe portable SSDs brings nearly twice the speed of previous-gen SATA models. Samsung still has the performance advantage, but WD isn’t too far behind now. Other than speed, you should choose your SSD based on whether you prioritise features such as AES encryption and ruggedisation. SSDs are also routinely discounted below their official MRPs, so if you do find a great deal on the WD My Passport SSD (2020) and it meets your requirements, you shouldn’t hesitate to pick one up.

WD My Passport SSD (2020)
Price (MOP):

Rs. 6,999 (500GB)
Rs. 12,999 (1TB)
Rs. 24,999 (2TB)


  • NVMe-based, good read and write speeds 
  • Good value for money
  • Compact and light


  • Gets a bit warm when stressed
  • No IP rating


  • Performance: 4.5
  • Value for Money: 4.5
  • Overall: 4.5

Source link

Continue Reading


Edge computing and IoT sensors help cities plug a leak in water bills

pipes valves

Tracking the health of pipes and water meters in real time helps cities catch water main breaks sooner and issue more accurate bills.

Image: Getty Images/iStockphoto

A Texas company is using edge computing and IoT sensors to help cities modernize crumbling water infrastructure and inaccurate water meters. The American Society of Civil Engineers has given the country’s drinking water system a D- for the last 10 years. Many components of city water systems date back to the Civil War era. Olea Edge Analytics is using 21st century technology to spot needed repairs and make sure water bills are accurate. 

Dave Mackie, Olea Edge Analytics’ CEO, said the company combines edge computing with artificial intelligence and machine learning to help cities make more informed decisions.

“Our network operations center can remotely manage all of the endpoints across the city, prioritizing repair work, giving the ideal route and directions, and transmitted work plans and specifications to provide everything crews need for a right-first-time trip,” he said in a press release.

SEE: 5 Internet of Things (IoT) innovations (free Pdf) (TechRepublic)

Olea puts sensors on water meters and sends data about how much water is used to the cloud for analysis. The Smart Water Management Platform monitors the meters to look for water usage that isn’t showing up on monthly bills. Olea estimates that up to 40% of all high-volume commercial water meters are not capturing the full amount of water used. 

As Brandon Vigliarolo wrote in “
5 edge computing predictions for 2021

,” Forrester predicts that this is the year that new business models will push edge computing “from science project to real value.” Forrester analysts said that cloud platforms, artificial intelligence, and the widespread proliferation of 5G will make these edge use cases more practical.

SEE: The future of IoT: 5 major predictions for 2021 (TechRepublic)

The Department of Watershed Management of the City of Atlanta is spending $3.9 million on a deal with Olea to measure water usage more accurately. 

The COVID-19 pandemic has created a serious budget shortfall for many cities around the US. According to the National League of Cities, losses in sales tax and other revenue sources will cost cities $360 billion from this year through 2022.

Olea Edge Analytics produces products that use technology for revenue recovery. The company’s Vault Management platform allows utilities to manage assets and get alerts when something changes. A dashboard provides a high-level and operational view of workflows, including data about billing and consumption, maintenance, and safety. CityEdge uses blockchain, AI, and machine learning to spot problems in water infrastructure as soon as they happen. 

“People are surprised to learn that they can make these simple repairs and turn that money into a catalyst for much-needed projects,” Mackie said in a press release. “Everyone is looking for an edge in funding, especially during these economic times.”

With the CityEdge product, a blockchain validates water usage from when it leaves the meter’s sensors to the moment it reaches the customer. The encrypted data in the ledger is distributed across every device in the network, increasing transparency and traceability. The platform also creates a digital twin of every meter on the network. 

Also see

Source link

Continue Reading


DKK 42 million for sustainable chip-based spectrometers

technology org default image

In a new four-year Grand Solutions project—supported by Innovation Fund Denmark with DKK 25 million—DTU and four companies will join forces in a consortium called NEXUS to develop the next generation of ultracompact spectrometers based on chip technology:

“We will quite simply make spectrometers in a radically different way that will make them both inexpensive and sustainable,” says the originator of the new Innovation Fund Denmark project, Associate Professor Søren Stobbe from DTU Fotonik. He continues:

“In NEXUS, we will develop the nanotechnology and the chip technology, as well as the modules that will be used to integrate the spectrometers in the industry already during the project. In short, we will make it possible to perform measurements in places where you cannot measure today. And because we can make the spectrometers small and inexpensive, it can also be good business for companies to choose the most environmentally friendly solution.”

Spectrometers to reduce waste at dairies
To begin with, NEXUS’ spectrometers will make a difference for dairies.

Dairies need spectrometers to measure the contents of protein, fat, and water in their milk. But the spectrometers currently available on the market are large and expensive, which means that the dairies only have a very limited number of them. So when, for example, the dairies are to produce a new batch of semi-skimmed milk, they rinse the pipes with milk to be sure of what they have in the pipes. This means that they send around 10,000 litres of milk directly into the sewers every day. This could be avoided if spectrometers were instead installed to measure what is in the pipes.

Jacob Riis Folkenberg—Vice President of Technology at FOSS, which makes food production equipment—is therefore convinced that the new optical spectroscopy technology has the potential to revolutionize the market:

“In addition to being a waste of time and energy, the 10,000 litres of milk going to waste every day also has a fairly high market value.  If you can get the price of a spectrometer down, this will quickly turn into a really good business case for the dairies. We estimate that there is a market potential of three billion Danish kroner at the dairies alone,” he says.

The core of the NEXUS project is DTU’s patented chip technology.

“We have a prototype that works, but we don’t yet have the spectral resolution we need,” says Associate Professor at DTU Fotonik, Søren Stobbe, and continues:

“We need to develop a lot of stuff in the chip, and it must then be built into the whole technology that surrounds it. For it’s one thing to make a chip. But—in reality—a large part of the work is to integrate the chip with the surroundings.”

While DTU Fotonik is responsible for the development of the chip, the companies Beamfox Technologies ApS and ELIONIX INC will develop methods for nanofabrication of the chip. Ibsen Photonics A/S makes the modules in which the chip will be integrated, and FOSS makes the food production probes in which the modules will be installed and which can be used at the dairies.

Wind turbines, aircraft, and health monitoring on the mobile
The NEXUS project starts with the dairies, but the technology will also be relevant in many other contexts.

“The ultimate vision is to be able to make spectrometers so small and inexpensive that it can, for example, be worthwhile to build them into mobile phones. The spectrometer will be able to make a kind of primitive blood test, which could give you an indication of whether you need to see your doctor,” says Søren Stobbe.

“Another example is so-called optical interrogation monitors, which can be used to measure and predict the behaviour of large mechanical structures. They can be built into a bridge, a wind turbine blade, or an aeroplane wing, where they will then monitor whether the material begins to give off some strange vibrations. The area of application for spectrometers—if you can make them in this low price range—is gigantic.”

Source: DTU

Source link

Continue Reading