Problem: Company.com has an exernal dns-record for service.company.com which should be resolved to an inernal IP by internal clients.
Let’s say that service.company.com resolves to 1.1.1.1 by the external DNS but when computers are connecting to this URL from inside the company network the internal DNS servers at ad.company.com needs to resolve service.company.com to 172.16.51.25.
Adding an entry to the hosts-file on each client computer to override service.company.com will not work when clients connect on exteral networks like from home or a coffeeshop.
Windows Server 2012 R2 and Windows 8.1 is RTM and that means PowerShell 4 is as well!
PowerShell 4.0 brings a whole bunch of new treats to the table, one of the most notable being Desired State Configuration which I will come back to in a later post, but there is also a bunch of other news, one of them being a few new cmdlets in the Dism module.
The following commandlets are new in the Dism module and worth noting are the three parameters -LogPath -LogLevel and -ScratchDirectory which is available for all cmdlets below.
Sometimes I write a script where I need To wait until a certain time or for a certain event, like after business hours or when a service is in a running state.
To achieve this I use a do…until loop simply repeating a short wait time until my requirement returns true.
The following snippet will pause until a given time:
do {<br /> Start-Sleep 1<br /> }<br /> until ((get-date) -ge (get-date "6:00 PM"))
UPDATE 2015-01-04: I’ve updated the script on Technet Gallery: https://gallery.technet.microsoft.com/Generate-a-random-and-5c879ed5
Drastically improved performance and randomization logic.
When provisioning new users to Active Directory we need to provide a new password and of course we want to generate a random password.
This is my thoughts and three methods for generating passwords, the first two quite simple and straightforward and the third method a little bit more complex and definitely the one I recommend.
Windows Server 2012 R2 Preview is finally available for download: http://windows.microsoft.com/en-us/windows-8/download-preview
Really looking forward to set it up in my lab.