header image

Archive for August, 2013

Server Core Module

Posted by: | August 31, 2013 | No Comment |

On a Windows Server 2012 system you will find a ServerCore module with two cmdlets Get-DisplayResolution Set-DisplayResolution On a full GUI system the cmdlets work PS> Get-DisplayResolution 1366×768 1280×1024   And thats it!  Not a lot but it shows the basic information You set the resolution like this Set-DisplayResolution -Width 1366 -Height 768   If […]

under: PowerShell V3, Windows Server 2012

Third Age of PowerShell

Posted by: | August 31, 2013 | No Comment |

We’re now firmly in the Third Age of PowerShell. The First Age covered the betas and PowerShell 1.0 PowerShell was adopted by developers and admins (with a scripting background) that saw the need for better automation tools and went looking for them. Information was sketchy, and every new discovery of how to do something generated […]

under: Opinion

Travelling devices

Posted by: | August 31, 2013 | No Comment |

Disclaimer: The following is based on my personal experiences and needs that may well not match yours. Feel free to disagree with my conclusions. I offer my insights to help others decide on the devices that suit them.   I’ve been using a number of devices over the last six months or so and found […]

under: General

Filtering AD searches

Posted by: | August 30, 2013 | No Comment |

Interesting question came up regarding how you define a Filter when you are searching for particular users. With the Microsoft cmdlets you can define a filter or an ldapfilter. In these examples we’re looking for users that don’t have email addresses. First lets look at a filter PS> Get-ADUser -Filter {mail -notlike "*"} | select […]

under: PowerShell and Active Directory

Setting an IP address

Posted by: | August 30, 2013 | No Comment |

I need to add an IP address to an adapter.  I could use the GUI or WMI but with Windows 8/2012 and above I’ve got all of the nifty networking cmdlets to play with. Lets start with finding the adapter to use PS>Get-NetAdapter will show all of the adapters. Unlike ipconfig it only shows real […]

under: Networking, PowerShell V3, Windows 8, Windows Server 2012

Protecting your csv files

Posted by: | August 29, 2013 | No Comment |

I’m using csv files for this example but it applies to other types of file as well. Let’s produce a csv file: Get-ChildItem -Path C:\Users\Richard\Documents -File | select FullName, Length, LastWriteTime | Export-Csv files.csv This gives a small, useful set of data for the purposes of this post. You can read the data back in: […]

under: PowerShell Basics

It’s the little things

Posted by: | August 29, 2013 | No Comment |

I’ve been spending some quality time with PowerShell 2.0 recently. When it was all we had it was great but there’s a bunch of things I miss from PowerShell 3.0 including: CIM cmdlets CIM sessions Workflows Module auto loading Improved tab completion PowerShell 3.0 ISE especially the combined input/output panes Of them all it’s the […]

under: PowerShell V3, PowerShellV2

DNS zone types

Posted by: | August 29, 2013 | No Comment |

I was looking at the DNS zones for a project I’m working on. I needed to discover the conditional forwarder zone and hence the IP address of the DNS server to which the forwarding was occurring. The zone I wanted had a ZoneType of 4 which puzzled me. I remembered showing code to create a […]

under: DNS, PowerShell and WMI

My Learn AD Management in a Month of Lunches is moving on apace with the release of chapter 17 to the Early Access Process. This one covers AD replication www.manning.com/siddaway3 Enjoy

under: Books, PowerShell and Active Directory, Windows Server 2012

International Module

Posted by: | August 28, 2013 | No Comment |

The International module has an interesting set of cmdlets: £> Get-Command -Module International | select Name Name —- Get-WinAcceptLanguageFromLanguageListOptOut Get-WinCultureFromLanguageListOptOut Get-WinDefaultInputMethodOverride Get-WinHomeLocation Get-WinLanguageBarOption Get-WinSystemLocale Get-WinUILanguageOverride Get-WinUserLanguageList New-WinUserLanguageList Set-Culture Set-WinAcceptLanguageFromLanguageListOptOut Set-WinCultureFromLanguageListOptOut Set-WinDefaultInputMethodOverride Set-WinHomeLocation Set-WinLanguageBarOption Set-WinSystemLocale Set-WinUILanguageOverride Set-WinUserLanguageList £> Get-WinHomeLocation | fl * GeoId        : 242 HomeLocation : United Kingdom £> Get-WinSystemLocale | fl * Parent                         : […]

under: PowerShell V3, Windows 8, Windows Server 2012

Older Posts »