Last updated:

PowerShell is an open-source shell and scripting language based on the .NET Framework developed by Microsoft. It attempts to assist IT professionals who are not software engineers in developing efficient scripts and tools to perform their jobs more effectively.

PowerShell evolved from VBScript and batch files to offer a first-class command-line interface and script language that is simple to comprehend and utilize. Similar to object-oriented programming, PowerShell is object-oriented and largely reliant on objects (OOP).

PowerShell is two things: a command-line shell that enables users to execute commands through a command-line prompt equivalent to the traditional command prompt (cmd.exe). Additionally, it is a powerful scripting language capable of developing tools and automating just about everything you can imagine.

PowerShell has a wide range of commands, known as cmdlets and functions, that may be used in an interactive or scripted manner. These commands are either built binaries or user-written code covering a specific operation, such as reading a file or pinging a host machine.

Why Should You Use Powershell?

The following are some compelling reasons to use Powershell:

Powershell’s characteristics

Powershell vs Powershell core

There are significant differences between Powershell’s Core and Desktop editions. It’s worth noting that the Core version of Powershell lacks several modules; thus, if your organization’s systems rely on such modules, switching to Powershell Core may not be a realistic solution.

Apart from that, Microsoft is attempting to replace Powershell with Powershell Core, with the Core version receiving new updates. Therefore it may be preferable to switch to Core if no key modules are missing. we have listed down some of the differences in the table below:

PowerShell (Desktop Edition)PowerShell (Core edition)
IterationsVersions 1.0, 2.0, 3.0, 4.0, 5.0 ,and 5.1Versions 6.0 and 7
CompatibilityWindows-compatible onlyCross-Platform Support for Linux and macOS as well as Ubuntu, Fedora, and CentOS .Net Framework
Runtime.Net Framework runtime $PSVersionTable.PSEdition set to Desktop.Net core runtime $PSVersionTable.PSEdition set to Core
Programpowershell.exepwsh.exe in windows operating systems and pwsh in macOS and Linux
Update policyCritical bug fixes will be released with no other updatesNew features will be added as well as bug fixes
PackageComes as a built-in component Windows operating systems but can be installed via WMFThe open-source software that can be installed via MSI,ZIP, or PKG in MacOS
Supported scripting environmentWindows Powershell Integrated Scripting Environment (ISE)Visual Studio Code ( VSCODE) with the Powershell edition
Install locations$env:WINDIR\System32\WindowsPowerShell\v1.0$env:ProgramFiles\WindowsPowerShell\7
Loading of PowerShell modules$env:WINDIR\System32\WindowsPowerShell\v1.0\Modules$PSHOME\Modules
Profile Path$HOME\Documents\ Windows PowerShell$HOME\Documents\PowerShell

How to install PowerShell core

PowerShell Core installation is a simple process. As shown in the graphic below, PowerShell core installs using a basic wizard similar to that used by most other Windows apps.

alt_text

Take a look at the following screenshot to see what the PowerShell core looks like. The PowerShell supplied with Windows 10 is running in the left-hand window, while PowerShell Core is running in the right-hand window.

alt_text

The most apparent difference between the two windows is the background color, but a closer examination reveals more details. First, both PowerShell and PowerShell Core have notifications indicating that they are Microsoft-developed tools. The GitHub page for PowerShell Core nearly gives the impression that it is a third-party program, however, it is sanctioned by Microsoft.

Furthermore, you’ll see the version number in the screenshot. PowerShell 5.x is pre-installed on Windows. The version information for PowerShell Core does not even refer to it as “PowerShell Core,” but rather to PowerShell 6.1.3.

In most cases, when Microsoft releases a new version of a Windows component, the latest version replaces the previous version. That will not be the case with PowerShell. PowerShell Core is more than a replacement for PowerShell. Indeed, it serves a somewhat different function.

PowerShell on Linux

Microsoft has developed packages for nearly all Linux distributions that make it easy to install PowerShell on Linux. For instance, the following scripts will install PowerShell Core in Ubuntu:

PowerShell with Docker

You can easily experiment with PowerShell by using one of the official Microsoft PowerShell docker image

docker run -it --rm  mcr.microsoft.com/powershell:latest pwsh -Command Write-Host "Hello World"

How to create a PowerShell script?

Using the Notepad to create scripts

To build a PowerShell script on Windows 10 using the Notepad editor, follow these steps:

Example: Write-Host "Hi Nicolas, here’s How to create a script using Notepad"

Using PowerShell ISE terminal to create scripts

Alternatively, you may code your scripts on Windows 10 using the built-in PowerShell ISE terminal. Although the Integrated Scripting Environment is a sophisticated tool, the following steps will get you started:

alt_text

alt_text

After completing the steps in Notepad or PowerShell ISE, the script is ready to start but initially fails. The default PowerShell settings are always configured to prevent any script from being executed. (Except running the script’s contents inside Visual Studio Code or PowerShell ISE.)

How to run PowerShell script file on Windows 10

If you want to launch a script file using PowerShell on Windows 10, you must update the execution policy.

To modify the execution policy to permit the execution of PowerShell scripts, follow these steps:

alt_text

	& "C:\PATH\TO\SCRIPT\first script.ps1"

alt_text

After you’ve completed all of the steps, the script will run, and if it was created properly, you should see the output without any problems.

On Windows 10, PowerShell supports four different execution policies, including the following:

In the above steps, we used the command to execute local scripts on Windows 10. However, if you are not expecting to execute scripts frequently, you may restore the default settings to prohibit untrusted scripts by following the identical procedures as above, but on step No. 4, use the Set-ExecutionPolicy Restricted command.

How to check your Powershell version

To determine the PowerShell version installed on Windows, do the following steps:

alt_text

PowerShell commands

PowerShell commands are referred to as cmdlets. In PowerShell, the simplest approach to locate these commands is to perform Get-Command -Type Cmdlet.

# Get all cmdlets, functions, and aliases
Get-Command

# Get all commands of all types
Get-Command *

# Get cmdlets and display them in order
Get-Command -Type Cmdlet | Sort-Object -Property Noun | Format-Table -GroupBy Noun

This generates a list of all possible commands in PowerShell. You may scroll down the list till you locate the correct one.

alt_text

What are the drawbacks of Windows PowerShell?

Custom software firms should consider a few downsides to employing PowerShell scripts for software development. The following are some of the points to consider.

Conclusion

PowerShell is a Microsoft-developed platform for tasks/job automation and configuration management that comprises of a command-line shell and a scripting language based on the .NET framework. It is a Windows first shell that can run cross-platform and can rival with other shell like bash on Windows 10.

Although PowerShell is a very powerful shell and scripting language, it might take some time to fully comprehend, particularly if you are unfamiliar with the .NET Framework. If you want to go further, Microsoft provide an extensive PowerShell documentation, which is fully opensourced and available in this Github PowerShell-Docs repository.

Reference Table: Cmdlet and Function

NameAliasDescriptionType
Get-ChildItemdir, gci, lsGets the files and folders in a file system drive.Cmdlet
Invoke-CommandicmRuns commands on local and remote computers.Cmdlet
Import-ModuleipmoAdds modules to the current session.Cmdlet
Export-CsvepcsvConverts objects into a series of comma-separated (CSV) strings and saves the strings in a CSV file.Cmdlet
Write-HostWrites customized output to a host.Cmdlet
Get-WmiObjectgwmiGets instances of WMI classes or information about the available classes.Cmdlet
Get-Contentcat, gc, typeGets the contents of a file.Cmdlet
Get-DateGets the current date and time.Cmdlet
Invoke-WebRequestcurl, iwr, wgetGets content from a web page on the Internet.Cmdlet
Start-Processsaps, startStarts one or more processes on the local computer.Cmdlet
Copy-Itemcopy, cp, cpiCopies an item from one location to another.Cmdlet
Set-ExecutionPolicyChanges the user preference for the Windows PowerShell execution policy.Cmdlet
Out-FileSends output to a file.Cmdlet
Where-Object?, whereSelects objects from a collection based on their property values.Cmdlet
Import-CsvipcsvCreates table-like custom objects from the items in a CSV file.Cmdlet
Send-MailMessageSends an email message.Cmdlet
New-ObjectCreates an instance of a Microsoft .NET Framework or COM object.Cmdlet
Select-StringslsFinds text in strings and files.Cmdlet
Remove-Itemdel, erase, rd, ri, rm, rmdirDeletes files and folders.Cmdlet
Select-ObjectselectSelects objects or object properties.Cmdlet
Test-PathDetermines whether all elements of a file or directory path exist.Cmdlet
Invoke-RestMethodirmSends an HTTP or HTTPS request to a RESTful web service.Cmdlet
Install-PackageInstalls one or more software packages.Cmdlet
ForEach-Object%, foreachPerforms an operation against each item in a collection of input objects.Cmdlet
Write-Outputecho, writeSends the specified objects to the next command in the pipeline. If the command is the last command in thepipeline, the objects are displayed in the console.Cmdlet
Get-Processgps, psGets the processes that are running on the local computer or a remote computer.Cmdlet
Get-ServicegsvGets the services on a local or remote computer.Cmdlet
Format-TableftFormats the output as a table.Cmdlet
Test-ConnectionSends ICMP echo request packets (“pings”) to one or more computers.Cmdlet
New-ItemniCreates a new item.Cmdlet
Get-EventLogGets the events in an event log, or a list of the event logs, on the local or remote computers.Cmdlet
Get-WinEventGets events from event logs and event tracing log files on local and remote computers.Cmdlet
Install-ModuleDownloads one or more modules from an online gallery, and installs them on the local computer.Function
Enter-PSSessionetsnStarts an interactive session with a remote computer.Cmdlet
Get-CredentialGets a credential object based on a user name and password.Cmdlet
Read-HostReads a line of input from the console.Cmdlet
Get-AppxPackageGets a list of the app packages that are installed in a user profile.Cmdlet
Get-AclGets the security descriptor for a resource, such as a file or registry key.Cmdlet
Get-HelpDisplays information about Windows PowerShell commands and concepts.Cmdlet
Start-JobsajbStarts a Windows PowerShell background job.Cmdlet
Add-PSSnapinAdds one or more Windows PowerShell snap-ins to the current session.Cmdlet
New-PSSessionnsnCreates a persistent connection to a local or remote computer.Cmdlet
Invoke-ExpressioniexRuns commands or expressions on the local computer.Cmdlet
Add-ContentacAppends content, such as words or data, to a file.Cmdlet
New-PSDrivemount, ndrCreates temporary and persistent mapped network drives.Cmdlet
Move-Itemmi, move, mvMoves an item from one location to another.Cmdlet
Get-ItemgiGets files and folders.Cmdlet
Compare-Objectcompare, diffCompares two sets of objects.Cmdlet
Sort-ObjectsortSorts objects by property values.Cmdlet
Test-NetConnectionDisplays diagnostic information for a connection.Function
Set-AclChanges the security descriptor of a specified item, such as a file or a registry key.Cmdlet
Set-ContentscReplaces the contents of a file with contents that you specify.Cmdlet
Start-TranscriptCreates a record of all or part of a Windows PowerShell session to a text file.Cmdlet
Get-HotFixGets the hotfixes that have been applied to the local and remote computers.Cmdlet
Get-ItemPropertygpGets the properties of a specified item.Cmdlet
Add-MemberAdds custom properties and methods to an instance of a Windows PowerShell object.Cmdlet
Remove-AppxPackageRemoves an app package from a user account.Cmdlet
Rename-Itemren, rniRenames an item in a Windows PowerShell provider namespace.Cmdlet
Add-TypeAdds a.NET Framework type (a class) to a Windows PowerShell session.Cmdlet
Get-MembergmGets the properties and methods of objects.Cmdlet
ConvertTo-SecureStringConverts encrypted standard strings to secure strings. It can also convert plain text to secure strings. It isused with ConvertFrom-SecureString and Read-Host.Cmdlet
New-SelfSignedCertificateCreates a new self-signed certificate for testing purposes.Cmdlet
Start-SleepleepSuspends the activity in a script or session for the specified period of time.Cmdlet
Restart-ComputerRestarts (“reboots”) the operating system on local and remote computers.Cmdlet
Out-GridViewogvSends output to an interactive table in a separate window.Cmdlet
Format-ListflFormats the output as a list of properties in which each property appears on a new line.Cmdlet
Set-ItemPropertypCreates or changes the value of a property of an item.Cmdlet
Measure-ObjectmeasureCalculates the numeric properties of objects, and the characters, words, and lines in string objects, such asfiles of text.Cmdlet
Split-PathReturns the specified part of a path.Cmdlet
Get-CounterGets performance counter data from local and remote computers.Cmdlet
Get-CimInstanceGets the CIM instances of a class from a CIM server.Cmdlet
Add-ComputerAdd the local computer to a domain or workgroup.Cmdlet
Add-AppxPackageAdds a signed app package to a user account.Cmdlet
ConvertTo-HtmlConverts Microsoft .NET Framework objects into HTML that can be displayed in a Web browser.Cmdlet
Import-StartLayoutImports the layout of the Start into a mounted Windows image.Cmdlet
Set-Locationcd, chdir, slSets the current working location to a specified location.Cmdlet
Get-NetAdapterGets the basic network adapter properties.Function
Export-StartLayoutExports the layout of the Start screen.Cmdlet
Enable-PSRemotingConfigures the computer to receive remote commands.Cmdlet
Get-CommandgcmGets all commands.Cmdlet
Get-ExecutionPolicyGets the execution policies for the current session.Cmdlet
Join-PathCombines a path and a child path into a single path.Cmdlet
Import-PSSessionipsnImports commands from another session into the current session.Cmdlet
Get-FileHashComputes the hash value for a file by using a specified hash algorithm.Function
Write-ErrorWrites an object to the error stream.Cmdlet
Stop-ServicepsvStops one or more running services.Cmdlet
Stop-Processkill, sppsStops one or more running processes.Cmdlet
Start-ServiceasvStarts one or more stopped services.Cmdlet
Unblock-FileUnblocks files that were downloaded from the Internet.Cmdlet
Get-DiskGets one or more disks visible to the operating system.Function
Get-ModulegmoGets the modules that have been imported or that can be imported into the current session.Cmdlet
ConvertTo-JsonConverts an object to a JSON-formatted string.Cmdlet
New-WebServiceProxyCreates a Web service proxy object that lets you use and manage the Web service in Windows PowerShell.Cmdlet
Reset-ComputerMachinePasswordResets the machine account password for the computer.Cmdlet
Get-ScheduledTaskGets the task definition object of a scheduled task that is registered on the local computer.Function
Write-EventLogWrites an event to an event log.Cmdlet
Set-ServiceStarts, stops, and suspends a service, and changes its properties.Cmdlet
Out-StringSends objects to the host as a series of strings.Cmdlet
Get-PrinterRetrieves a list of printers installed on a computer.Function
Out-NullDeletes output instead of sending it down the pipeline.Cmdlet
Resolve-DnsNameundefinedCmdlet
Get-WindowsUpdateLogMerges Windows Update .etl files into a single log file.Function
Restart-ServiceStops and then starts one or more services.Cmdlet
Set-Variableet, svSets the value of a variable. Creates the variable if one with the requested name does not exist.Cmdlet
Compress-ArchiveCreates an archive, or zipped file, from specified files and folders.Function
ConvertFrom-JsonConverts a JSON-formatted string to a custom object.Cmdlet
New-SmbShareCreates an SMB share.Function
Set-ItemiChanges the value of an item to the value specified in the command.Cmdlet
Update-HelpDownloads and installs the newest help files on your computer.Cmdlet
Group-ObjectgroupGroups objects that contain the same value for specified properties.Cmdlet
Start-BitsTransferCreates a BITS transfer job.Cmdlet
Get-CertificateSubmits a certificate request to an enrollment server and installs the response or retrieves a certificate for apreviously submitted request.Cmdlet
Register-ScheduledTaskRegisters a scheduled task definition on a local computer.Function
Tee-ObjectteeSaves command output in a file or variable and also sends it down the pipeline.Cmdlet
Test-ComputerSecureChannelTests and repairs the secure channel between the local computer and its domain.Cmdlet
Measure-CommandMeasures the time it takes to run script blocks and cmdlets.Cmdlet
ConvertFrom-SecureStringConverts a secure string to an encrypted standard string.Cmdlet
Get-JobgjbGets Windows PowerShell background jobs that are running in the current session.Cmdlet
Export-ClixmlCreates an XML-based representation of an object or objects and stores it in a file.Cmdlet
ConvertTo-CsvConverts objects into a series of comma-separated value (CSV) variable-length strings.Cmdlet
Remove-AppxProvisionedPackageRemoves an app package (.appx) from a Windows image.Cmdlet
New-ItemPropertyCreates a new property for an item and sets its value.Cmdlet
Get-PhysicalDiskGets a list of all PhysicalDisk objects visible across any available Storage Management Providers, or optionally afiltered list.Function
Set-TimeZoneSets the system time zone to a specified time zone.Cmdlet
Get-PackageReturns a list of all software packages that have been installed by using Package Management.Cmdlet
Get-SmbShareRetrieves the SMB shares on the computer.Function
Get-VariablegvGets the variables in the current console.Cmdlet
Add-PrinterAdds a printer to the specified computer.Function
Resolve-PathrvpaResolves the wildcard characters in a path, and displays the path contents.Cmdlet
Select-XmlFinds text in an XML string or document.Cmdlet
Get-RandomGets a random number, or selects objects randomly from a collection.Cmdlet
Get-PSDrivegdrGets drives in the current session.Cmdlet
Expand-ArchiveExtracts files from a specified archive (zipped) file.Function
Receive-JobrcjbGets the results of the Windows PowerShell background jobs in the current session.Cmdlet
New-NetFirewallRuleCreates a new inbound or outbound firewall rule and adds the rule to the target computer.Function
New-NetIPAddressCreates and configures an IP address.Function
Get-NetIPAddressGets the IP address configuration.Function
Register-ObjectEventSubscribes to the events that are generated by a Microsoft .NET Framework object.Cmdlet
Get-SmbConnectionRetrieves the connections established from the SMB client to the SMB servers.Function
New-TimeSpanCreates a TimeSpan object.Cmdlet
Enable-WindowsOptionalFeatureEnables a feature in a Windows image.Cmdlet
Set-NetConnectionProfileChanges the network category of a connection profile.Function
New-ScheduledTaskTriggerCreates a scheduled task trigger object.Function
Rename-ComputerRenames a computer.Cmdlet
Get-EventGets the events in the event queue.Cmdlet
Test-WSManTests whether the WinRM service is running on a local or remote computer.Cmdlet
Get-AppxProvisionedPackageGets information about app packages (.appx) in an image that will be installed for each new user.Cmdlet
Wait-ProcessWaits for the processes to be stopped before accepting more input.Cmdlet
Wait-JobwjbSuppresses the command prompt until one or all of the Windows PowerShell background jobs running in the sessionare completed.Cmdlet
Write-DebugWrites a debug message to the console.Cmdlet
Import-CertificateImports one or more certificates into a certificate store.Cmdlet
New-EventLogCreates a new event log and a new event source on a local or remote computer.Cmdlet
Get-HostGets an object that represents the current host program.Cmdlet
Invoke-WmiMethodCalls WMI methods.Cmdlet
Update-ScriptUpdates a script.Function
New-ServiceCreates a new Windows service.Cmdlet
ConvertFrom-CsvConverts object properties in comma-separated value (CSV) format into CSV versions of the original objects.Cmdlet
Invoke-ItemiiPerforms the default action on the specified item.Cmdlet
Enable-WSManCredSSPEnables CredSSP authentication on a computer.Cmdlet
Get-UniqueguReturns unique items from a sorted list.Cmdlet
Find-PackageFinds software packages in available package sources.Cmdlet
Out-HostohSends output to the command line.Cmdlet
Format-VolumeFormats one or more existing volumes or a new volume on an existing partition.Function
Format-CustomfcUses a customized view to format the output.Cmdlet
Get-SmbServerConfigurationRetrieves the SMB server configuration.Function
Mount-DiskImageMounts a previously created disk image (virtual hard disk or ISO), making it appear as a normal disk.Function
Clear-Hostclear, clsClears the display in the host program.Function
Start-DscConfigurationApplies configuration to nodes.Cmdlet
Get-SmbOpenFileRetrieves basic information about the files that are open on behalf of the clients of the SMB server.Function
Add-VpnConnectionAdds a VPN connection to the Connection Manager phone book.Function
Set-DnsClientServerAddressSets DNS server addresses associated with the TCP/IP properties on an interface.Function
Export-ModuleMemberSpecifies the module members that are exported.Cmdlet
Get-PSSessiongsnGets the Windows PowerShell sessions on local and remote computers.Cmdlet
Get-PSSnapinGets the Windows PowerShell snap-ins on the computer.Cmdlet
Get-NetConnectionProfileGets a connection profile.Function
Get-NetFirewallRuleRetrieves firewall rules from the target computer.Function
Push-LocationpushdAdds the current location to the top of a location stack.Cmdlet
Get-VolumeGets the specified Volume object, or all Volume objects if no filter is provided.Function
New-NetLbfoTeamCreates a new NIC team.Function
Get-NetTCPConnectionGets TCP connections.Function
Stop-ComputerStops (shuts down) local and remote computers.Cmdlet
Set-StrictModeEstablishes and enforces coding rules in expressions, scripts, and script blocks.Cmdlet
Set-NetFirewallRuleModifies existing firewall rules.Function
Add-AppxProvisionedPackageAdds an app package (.appx) that will install for each new user to a Windows image.Cmdlet
Enable-BitLockerEnables encryption for a BitLocker volume.Function
Get-Locationgl, pwdGets information about the current working location or a location stack.Cmdlet
Set-NetIPInterfaceModifies an IP interface.Function
New-VirtualDiskCreates a new virtual disk in the specified storage pool.Function
Remove-PSSessionrsnCloses one or more Windows PowerShell sessions (PSSessions).Cmdlet
Set-NetIPAddressModifies the configuration of an IP address.Function
Register-ScheduledJobCreates a scheduled job.Cmdlet
Set-SmbServerConfigurationSets the SMB Service configuration.Function
New-PartitionCreates a new partition on an existing Disk object.Function
Remove-PSDriverdrDeletes temporary Windows PowerShell drives and disconnects mapped network drives.Cmdlet
Remove-VariablervDeletes a variable and its value.Cmdlet
Get-WindowsOptionalFeatureGets information about optional features in a Windows image.Cmdlet
Import-ClixmlImports a CLIXML file and creates corresponding objects in Windows PowerShell.Cmdlet
Import-PfxCertificateImports certificates and private keys from a Personal Information Exchange (PFX) file to the destination store.Cmdlet
Uninstall-PackageUninstalls one or more software packages.Cmdlet
Set-AuthenticodeSignatureAdds an Authenticode signature to a Windows PowerShell script or other file.Cmdlet
Set-NetAdapterSets the basic network adapter properties.Function
Set-AliasalCreates or changes an alias for a cmdlet or other command element in the current Windows PowerShell session.Cmdlet
Set-WmiInstanceCreates or updates an instance of an existing Windows Management Instrumentation (WMI) class.Cmdlet
Disable-WindowsOptionalFeatureDisables a feature in a Windows image.Cmdlet
Update-ModuleDownloads and installs the newest version of specified modules from an online gallery to the local computer.Function
New-LocalUserCreates a local user account.Cmdlet
Mount-WindowsImageMounts a Windows image in a WIM or VHD file to a directory on the local computer.Cmdlet
Get-ItemPropertyValuegpvGets the value for one or more properties of a specified item.Cmdlet
New-AliasnalCreates a new alias.Cmdlet
New-JobTriggerCreates a job trigger for a scheduled job.Cmdlet
Get-Historyghy, h, historyGets a list of the commands entered during the current session.Cmdlet
New-CimSessionCreates a CIM session.Cmdlet
Get-LocalGroupGets the local security groups.Cmdlet
ConvertTo-XmlCreates an XML-based representation of an object.Cmdlet
New-PSSessionOptionCreates an object that contains advanced options for a PSSession.Cmdlet
Add-WindowsCapabilityInstalls a Windows capability package on the specified operating system image.Cmdlet
New-VariablenvCreates a new variable.Cmdlet
Convert-PathcvpaConverts a path from a Windows PowerShell path to a Windows PowerShell provider path.Cmdlet
Get-LocalGroupMemberGets members from a local group.Cmdlet
Add-WindowsPackageAdds a single .cab or .msu file to a Windows image.Cmdlet
Invoke-CimMethodInvokes a method of a CIM class.Cmdlet
ConvertFrom-StringCFSExtracts and parses structured properties from string content.Cmdlet
Export-CertificateExports a certificate from a certificate store into a file.Cmdlet
Unregister-ScheduledTaskUnregisters a scheduled task.Function
ConvertFrom-StringDataConverts a string containing one or more key and value pairs to a hash table.Cmdlet
Install-PackageProviderInstalls one or more Package Management package providers.Cmdlet
Get-LocalUserGets local user accounts.Cmdlet
Clear-ContentclcDeletes the contents of an item, but does not delete the item.Cmdlet
Remove-ModulermoRemoves modules from the current session.Cmdlet
Get-VpnConnectionRetrieves the specified VPN connection profile information.Function
Export-PfxCertificateExports a certificate or a PFXData object to a Personal Information Exchange (PFX) file.Cmdlet
Get-NetIPConfigurationGets IP network configuration.Function
Export-WindowsDriverExports all third-party drivers from a Windows image to a destination folder.Cmdlet
Grant-SmbShareAccessAdds an allow ACE for a trustee to the security descriptor of the SMB share.Function
Initialize-DiskInitializes a RAW disk for first time use, enabling the disk to be formatted and used to store data.Function
Get-NetIPInterfaceGets an IP interface.Function
Get-PfxCertificateGets information about .pfx certificate files on the computer.Cmdlet
Invoke-PesterInvokes Pester to run all tests (files containing *.Tests.ps1) recursively under the PathFunction
Add-OdbcDsnAdds an ODBC DSN.Function
Format-WidefwFormats objects as a wide table that displays only one property of each object.Cmdlet
Get-PartitionReturns a list of all partition objects visible on all disks, or optionally a filtered list using specifiedparameters.Function
Set-DiskTakes a Disk object or unique disk identifiers and a set of attributes, and updates the physical disk on thesystem.Function
Get-ScheduledJobGets scheduled jobs on the local computer.Cmdlet
Get-PnpDeviceReturns information about PnP devices.Function
Get-TpmGets an object that contains information about a TPM.Cmdlet
Disable-NetAdapterBindingDisables a binding to a network adapter.Function
Get-PSRepositoryGets PowerShell repositories.Function
Out-DefaultSends the output to the default formatter and to the default output cmdlet.Cmdlet
Add-PrinterDriverInstalls a printer driver on the specified computer.Function
Set-WinUserLanguageListSets the language list and associated properties for the current user account.Cmdlet
Get-ScheduledTaskInfoGets run-time information for a scheduled task.Function
Enable-NetFirewallRuleEnables a previously disabled firewall rule.Function
Out-PrinterlpSends output to a printer.Cmdlet
Add-PrinterPortInstalls a printer port on the specified computer.Function
Set-WinSystemLocaleSets the system locale (the language for non-Unicode programs) for the current computer.Cmdlet
Find-ModuleFinds modules from an online gallery that match specified criteria.Function
Get-NetAdapterVmqGets the VMQ properties of a network adapter.Function
Stop-TranscriptStops a transcript.Cmdlet
Get-SmbSessionRetrieves information about the SMB sessions that are currently established between the SMB server and theassociated clients.Function
Set-PSSessionConfigurationChanges the properties of a registered session configuration.Cmdlet
Add-MpPreferenceModifies settings for Windows Defender.Function
Set-SmbShareModifies the properties of the SMB share.Function
Set-VpnConnectionChanges the configuration settings of an existing VPN connection profile.Function
Start-ScheduledTaskStarts one or more instances of a scheduled task.Function
Suspend-BitLockerSuspends Bitlocker encryption for the specified volume.Function
Get-SmbShareAccessRetrieves the ACL of the SMB share.Function
Set-PSDebugTurns script debugging features on and off, sets the trace level, and toggles strict mode.Cmdlet
Get-StartAppsGets the names and AppIDs of installed apps.Function
Add-VpnConnectionRouteAdds a route to a VPN connection.Function
Get-VirtualDiskReturns a list of VirtualDisk objects, across all storage pools, across all providers, or optionally a filteredsubset based on provided criteria.Function
Write-InformationSpecifies how Windows PowerShell handles information stream data for a command.Cmdlet
New-ScheduledTaskCreates a scheduled task instance.Function
Set-CultureSets the user culture for the current user account.Cmdlet
New-ScheduledTaskSettingsSetCreates a new scheduled task settings object.Function
New-ScheduledTaskActionCreates a scheduled task action.Function
Set-PartitionSets attributes of a partition, such as active, read-only, and offline states.Function
Clear-VariableclvDeletes the value of a variable.Cmdlet
Add-KdsRootKeyGenerates a new root key for the Microsoft Group KdsSvc within Active Directory.Cmdlet
Exit-PSSessionexsnEnds an interactive session with a remote computer.Cmdlet
Add-LocalGroupMemberAdds members to a local group.Cmdlet
Set-LocalUserModifies a local user account.Cmdlet
Remove-ComputerRemoves the local computer from its domain.Cmdlet
New-NetNatCreates a NAT object.Function
Set-SmbClientConfigurationSets the SMB client configuration.Function
Set-ScheduledTaskModifies a scheduled task.Function
Remove-ItemPropertyrpDeletes the property and its value from an item.Cmdlet
Set-PrinterUpdates the configuration of an existing printer.Function
Set-PhysicalDiskSets attributes on a specific physical disk.Function
Set-DateChanges the system time on the computer to a time that you specify.Cmdlet
Repair-WindowsImageRepairs a Windows image in a WIM or VHD file.Cmdlet
Set-NetAdapterVmqSets the VMQ properties of a network adapter.Function
Remove-WmiObjectDeletes an instance of an existing Windows Management Instrumentation (WMI) class.Cmdlet
New-NetRouteCreates a route in the IP routing table.Function
Optimize-VolumeOptimizes a volume.Function
New-VolumeCreates a volume with the specified file system.Function
New-StoragePoolCreates a new storage pool using a group of physical disks.Function
New-SmbMappingCreates an SMB mapping.Function
Set-DscLocalConfigurationManagerApplies LCM settings to nodes.Cmdlet
New-ScheduledTaskPrincipalCreates an object that contains a scheduled task principal.Function
Get-CultureGets the current culture set in the operating system.Cmdlet
Set-PSRepositorySets values for a registered repository.Function
Set-NetFirewallProfileConfigures settings that apply to the per-profile configurations of the Windows Firewall with Advanced Security.Function
Get-AliasgalGets the aliases for the current session.Cmdlet
Get-DnsClientServerAddressGets DNS server IP addresses from the TCP/IP properties on an interface.Function
Set-MpPreferenceConfigures preferences for Windows Defender scans and updates.Function
Save-ModuleSaves a module locally without installing it.Function
Resize-PartitionResizes a partition and the underlying file system.Function
Repair-VolumePerforms repairs on a volume.Function
Remove-PrinterRemoves a printer from the specified computer.Function
Remove-PhysicalDiskRemoves a physical disk from a specified storage pool.Function
Remove-NetIPAddressRemoves an IP address and its configuration.Function
Register-PSRepositoryRegisters a PowerShell repository.Function
Get-WindowsCapabilityGets Windows capabilities for an image or a running operating system.Cmdlet
Get-BitLockerVolumeGets information about volumes that BitLocker can protect.Function
Get-ClipboardGets the current Windows clipboard entry.Cmdlet
Get-ComputerInfoGets a consolidated object of system and operating system properties.Cmdlet
Get-InitiatorPortGets one or more host bus adapter (HBA) initiator ports.Function
Get-BitsTransferGets the associated BitsJob object for an existing BITS transfer job.Cmdlet
Get-AuthenticodeSignatureGets information about the Authenticode signature for a file.Cmdlet
Get-AppvClientPackageReturns App-V Client Packages.Cmdlet
Set-WSManQuickConfigConfigures the local computer for remote management.Cmdlet
New-GuidCreates a GUID.Function
Get-StorageJobReturns information about long-running Storage module jobs, such as a repair task.Function
Uninstall-ModuleUninstalls a module.Function
Get-InstalledModuleGets installed modules on a computer.Function
Confirm-SecureBootUEFIConfirms that Secure Boot is enabled by checking the Secure Boot status on the local computer.Cmdlet
Set-ClipboardSets the current Windows clipboard entry.Cmdlet
Get-TlsCipherSuiteGets the list of cipher suites for TLS for a computer.Cmdlet
Clear-DiskCleans a disk by removing all partition information and un-initializing it, erasing all data on the disk.Function
GET UNIQUE TIPS AND THE LATEST NEWS BY SUBSCRIBING TO MY NEWSLETTER.
AND FOLLOW ME ON