Tag: PowerShell

Get Local Administrators on Servers

 jamilpremji  February 26, 2024  0 Comments on Get Local Administrators on Servers

To get a list of local administrators on a server using PowerShell, you can use the Get-LocalGroupMember cmdlet from the…

Get User Groups and Add Users to Groups

 jamilpremji  February 19, 2024  0 Comments on Get User Groups and Add Users to Groups

To find the Active Directory (AD) groups that a user is a member of, you can use the Get-ADPrincipalGroupMembership cmdlet…

PowerShell and Functions

 jamilpremji  February 16, 2024  0 Comments on PowerShell and Functions

A function in PowerShell is a block of code that can be defined and then called by name. Functions can…

Moving Your Script into a Reusable Function

 jamilpremji  February 12, 2024  0 Comments on Moving Your Script into a Reusable Function

There are several reasons why you might want to use functions in your PowerShell scripts: Overall, using functions can help…

What Can You Do with PowerShell?

 jamilpremji  February 7, 2024  0 Comments on What Can You Do with PowerShell?

PowerShell is a powerful tool that can be used to manage a wide variety of systems, including: Some common uses…

Send E-Mail

 jamilpremji  February 5, 2024  0 Comments on Send E-Mail

To send an e-mail notification using PowerShell, you can use the Send-MailMessage cmdlet. This cmdlet allows you to specify the…

If / Then / Else Statements

 jamilpremji  December 24, 2023  0 Comments on If / Then / Else Statements

In PowerShell, an if statement allows you to execute a block of code based on the evaluation of a conditional…

Invoke-WebRequest with PowerShell

 jamilpremji  November 25, 2023  0 Comments on Invoke-WebRequest with PowerShell

Invoke-WebRequest is a PowerShell cmdlet that retrieves data from a web page or web service. The data returned from the…

Log Out Certain Users from Servers with PowerShell

 jamilpremji  October 26, 2023  0 Comments on Log Out Certain Users from Servers with PowerShell

To query a Windows computer for all logged on users and log off a specific user using PowerShell, you can…

What This Blog Will Help You With

 jamilpremji  October 17, 2023  0 Comments on What This Blog Will Help You With

What This Blog Will Help You With “PowerShell for the Corporate Environment: A Practical Guide” is a comprehensive blog that…