Posts Tagged ‘PowerShell’

Disable Automatic Updates for Power Query for Excel

October 28, 2016 Leave a comment

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft Power Query for Excel]


New-ItemProperty -Path “HKLM:\SOFTWARE\Wow6432Node\Microsoft\Microsoft Power Query for Excel” -Name “DisableUpdateNotification” -PropertyType DWORD -Value 1


Quick Post: Restart a service on a remote computer using PowerShell

April 30, 2015 Leave a comment

Get-Service -Name w32time -ComputerName Server1 | Set-Service -Status Stopped
Get-Service -Name w32time -ComputerName Server1 | Set-Service -Status Running

Categories: Computers Tags:

Quick Post: Get Login Script for Users

February 12, 2015 Leave a comment

Get-ADUser -Filter * -SearchBase “DC=domainname,DC=com” -properties ScriptPath | select Name,ScriptPath

Quick Post: Count users in an OU structure in AD

February 5, 2015 Leave a comment

Get-ADUser -Filter * -SearchBase “OU=Users,OU=Company,DC=domain,DC=com” | Measure

You’ll get something like this.

Count    : 377
Average  :
Sum      :
Maximum  :
Minimum  :
Property :

Quick Post: Get a user’s group membership via PowerShell

February 4, 2015 Leave a comment

Get-ADPrincipalGroupMembership -Identity USERNAME | select name


Get-ADUser -Identity USERNAME -Properties MemberOf | Select -ExpandProperty MemberOf

Error Deactivating DHCP Scope

October 21, 2014 Leave a comment

On Windows Server 2008 R2 when using netsh to deactivate a DHCP scope you get an error that says, “The command needs a valid Scope IP Address”.

1 Error

Try again using an elevated PowerShell prompt.

2 Working

Categories: Computers Tags: , , ,

See which distribution list has a specific alias

In this example, find any distribution group that has the word contact in an alias.

Get-DistributionGroup | where {$_.EmailAddresses -match "contact"} | select Name, EmailAddresses | fl
Categories: Computers Tags: ,
%d bloggers like this: