-->
10 Powershell Cmdlets You Lot Tin Purpose Instead Of Cmd Commands - Techrepublic

10 Powershell Cmdlets You Lot Tin Purpose Instead Of Cmd Commands - Techrepublic

10 Powershell Cmdlets You Lot Tin Purpose Instead Of Cmd Commands - Techrepublic

https://www.techrepublic.com/article/pro-tip-migrate-to-powershell-from-cmd-with-these-common-cmdlets/
line based interface as well as a scripting linguistic communication to cause got trouble automation as well as configuration  10 PowerShell cmdlets yous tin work instead of CMD commands - TechRepublic

Image: iStock/gorodenkoff

When Microsoft developed PowerShell (PS) inward Nov 2006, the aim was to wed a command-line based interface as well as a scripting linguistic communication to cause got trouble automation as well as configuration management of native Microsoft applications. Through the years it has seen upgrades that increment its functionality, amongst to a greater extent than cmdlets (PS commands) as well as to a greater extent than back upward through importing modules to grant the framework greater flexibility inward managing a multifariousness of services.

As PowerShell's popularity has increased, its adoption charge per unit of measurement has fueled farther changes. Arguably the largest as well as most recent of these was Microsoft's determination to brand PS opened upward source, porting it to diverse Linux distributions as well as macOS as well as enabling cross-platform back upward through i unified shell. What does this hateful for non-PowerShell users? Simply put, PS is poised to non exclusively supersede the venerable ascendency draw that Windows admins know—but every bit organizations grow their user base of operations amongst Linux as well as macOS-based devices, admins tin port that noesis over to managing those devices every bit well, all from i console or shell.

For those who back upward Windows-only organizations, Microsoft has made inroads toward PS-based management yesteryear ensuring that much of its higher-level software, such every bit Windows Server, Active Directory, as well as Exchange, volition travel 100% manageable exclusively through PowerShell. Users managing services through the GUI or admin consoles won't travel able to fully configure every aspect of the application unless they switch to PowerShell. So hither are roughly unremarkably used commands yous may notice are component subdivision of your daily admin tasks—and the PS equivalent—to assistance yous migrate your usage over to PowerShell.

SEE: Windows administrator's PowerShell script kit (Tech Pro Research)

1. Changing directories

CMD: cd

PS: Set-Location "path/to/directory"

2. Listing files inward a directory

ADVERTISING

CMD: dir

PS: Get-ChildItem

3. Renaming files

CMD: rename

Privileged Access Management that fits your bandwidth, your budget as well as your business. Thycotic gives yous the PAM Cloud functionality, flexibility as well as ease of work yous desire as well as expect: Skip the professional person services as well as weeks of installation....

White Papers provided by Thycotic

PS: Rename-Item "path/to/file.ext" -NewName "newfilename.ext"

4. Getting assistance for a command

CMD: /?

PS: Get-Help "Cmdlet name"

5. Stopping processes

CMD: taskkill

PS: Stop-Process -Name "application.exe"

6. Forcing Group Policy refresh

CMD: gpupdate /force

PS: Invoke-GPUpdate -Computer "Hostname" -Force

7. Shutting downwards local (or remote) computer(s)

CMD: shutdown -s

PS: Stop-Computer -ComputerName "Hostname1","Hostname2", "localhost"

8. Restarting local (or remote) computer(s)

CMD: shutdown -r

PS: Restart-Computer -ComputerName "Hostname3", "localhost"

9. Setting variables

CMD: SET variable="value"

PS: $"variablename" = "value"

10. Joining a reckoner to a domain

CMD: netdom /domain:domainname /user:username /password:password fellow member hostname /add

PS: Add-Computer -DomainName "Domain" -Credential "Domain\Username" -Restart

Starting point

While this listing is inward no means exhaustive, it's a practiced outset measuring toward treading PowerShell's relatively deep waters inward a means that allows yous to acquire hands-on sense using it. It likewise provides a practiced jumping-off indicate for those who desire to navigate farther into PS as well as larn to a greater extent than virtually how its cmdlets tin travel exist used for greater manageability as well as to automate daily, repetitive tasks.

Also read...

Other tips for transitioning to PS?

What cmdlets select yous started using to simplify command-line tasks? Share your advice amongst swain TechRepublic members.

line based interface as well as a scripting linguistic communication to cause got trouble automation as well as configuration  10 PowerShell cmdlets yous tin work instead of CMD commands - TechRepublic

About Jesus Vigo

Jesus Vigo is a Network Administrator yesteryear 24-hour interval as well as possessor of Mac|Jesus, LLC, specializing inward Mac as well as Windows integration as well as providing solutions to small- as well as medium-size businesses. He brings nineteen years of sense as well as multiple certifications from seve...

WHITE PAPERS, WEBCASTS, AND DOWNLOADS



Blogger
Disqus
Pilih Sistem Komentar

No comments

Advertiser