10 additional PowerShell commands you can use instead of CMD commands

As PowerShell’s (PS) acceptance continues to grow, the benefits provided by the management framework will surely increase alongside it. Whether it be managing desktops, servers, network services, and/or app-specific features—IT will come to appreciate how extensive, deep, and robust the cmdlets are. They hook into the underlying system, offering complete control that is unmatched while residing in a native package that excels at what it was designed to do, while minimally impacting resources.

More about Windows

In continuing to demonstrate how IT pros can leverage PS to troubleshoot problems as they are reported, you will find another set of cmdlets below that may be used to great effect resolve issues that IT commonly comes across in completing their daily tasks. Check out 10 below.

2. List policies applied to clients

3. Output data on-screen to the printer

CMD: >LPT1

PS: | Out-Printer

Note: Prior to executing a cmdlet, append the suffix above to pipe the output to the default printer. To select a specific printer, use the -Name parameter and place the name of the local printer or UNC path to the shared printer to output the data to that device instead.

4. View and edit file/folder permissions

Note: Setting ACLs via PS requires you first read the ACL from a folder, that ACL may then be copied to the destination file/folder. If you wish to edit the permissions granularly, that requires a bit more setup and several more steps, see the example below:

5. Synchronizing system time with domain controller

Note: PowerShell lacks a cmdlet that exclusively syncs time/date. The cmdlets above allow for the retrieval and setting of time/date manually. Similar to the way Set-Acl works, the data may be copied from the DC and piped to the client as the example above displays.

For most uses, however, users are better off using the W32 Time Service command with the parameters below:

9. Update Group Policies on devices

CMD: gpupdate /force

PS: Invoke-GPUpdate -Force

10. Allow PowerShell commands to be executed on remote devices

CMD: N/A

PS: Enable-PSRemoting -Force

Note: By default, PSRemoting is disabled on newer versions of Windows. Due to security concerns, it should only be enabled, if needed. With that said, the cmdlet only needs to be run once per client for the listeners to become enabled. Once the listeners are enabled, client devices will process remote PS cmdlets received.