Powershell – How to use Transcripts to keep history of commands and output

The primary tool for logging Powershell activity has been the Start-Transcript cmdlet. Simply enter this cmdlet followed by a path and filename for the log file that you want to create. PowerShell will populate the log file with every subsequent command that is entered. Read More …

Active Directory Delegated Permissions (View/Remove)

Active Directory (AD) delegation is critical part of many organizations’ IT infrastructure. By delegating administration, you can grant users or groups only the permissions they need without adding users to privileged groups (e.g., Domain Admins, Account Operators). Read More …

Active Directory – Recycle Bin Feature

If an object has been deleted in your Active Directory, and you want it recovered, there are a number of things you can do. Simply put, ADRB allows you to recover objects immediately, without the need to use your System State backups, latent sites, or 3rd party add-ons. Read More …

Powershell – Check and find the product GUID of an installed MSI setup

The product code is the unique GUID of identifying an application or product release; In other words, different versions and languages of Product must have different product codes. Also, ProductCode can be used to query feature state, and product state. For example, installer API “MsiQueryFeatureStateEx()” and “MsiQueryProductState()”, etc. Read More …

Powershell – Find computer name and domain

Sometimes it’s useful to know the computer name and domain you are working on. The first of the following commands returns the FQDN of the computer on the format whereas the second one returns a list of information about the system. Read More …

Enabling DNS Registration Refresh Interval

On Active Directory domains is very important that clients set automatically their own DNS names on authoritative DNS servers for Read More …

Powershell – Variable for Null, Empty String and White Space

More often than not, we create variables with the intent they will hold a value. We typically then choose to act upon that value. Therefore, if a variable doesn’t have value, this is something we would want to check against in our conditional logic flow. Read More …

Enable WinRM with Group Policy for PowerShell Remoting

PowerShell Remoting really can makes a routine work a lot easier, but it requires quite a bit of work to get all the remote computers ready to take the remoting calls, such as automatically start Windows Remote Management service. Read More …

Powershell – If -And & If -Or Statements

One of the best statements for filtering data is the If clause. For scripts that require precise flow control you could incorporate PowerShell’s -And, the benefit is that your test could now include multiple conditions. Read More …

Windows Server 2016 – Create and Enable Clustered Shared Volumes (CSV)

CSV (Cluster Shared Volumes) is a feature in Windows Server family in which shared disks are concurrently accessible to all nodes within a failover cluster. The feature was first introduced in Windows Server 2008 R2 as a way to simplify storage with clustered Hyper-V virtual machines (VMs), but this is not limited to Hyper-V applications. Read More …