Todd's Blog

Todd's Tips for System Adminstrators

  • TechDays
  • Speaking Engagements
  • Contact Me
  • About Me

Connect

  • LinkedIn

Powered by Genesis

Fix a Windows Machine not getting its info from the KMS Server

posted on June 10, 2014

I’ve noticed over the past little bit where servers were reporting they were not genuine. We have a KMS infrastructure and machines are authenticating against it, yet we are seeing some that are not able to talk any more.

My co-worker and I began troubleshooting it, we jumped on the KMS Server and just checked stuff was on and working. It was, if it wasn’t, all hell would have broke loose.

Next we jumped on the Windows Server being affected. We looked at the product info and it stated no information. I wish we had grabbed a screenshot. If I get another server with this issue, I’ll repost.

Next we jumped to the command prompt and type

slmgr /ipk YC6KT-GKW9T-YTKYR-T4X34-R7VHC.

This key is the KMS key you use when you want Windows to use KMS instead of MAK. This changed the server from not having info to be unlicensed and needing a key. Next we force the server to communicate with the KMS server. 

Next we run

slmgr /ato

Once the machine checks in with the KMS server you are good to go. Again, this is with the assumption that your KMS server is up, running properly and has hit the threshold for number of machines needed to start activation.

If you need all the keys for KMS activation, here you are  http://technet.microsoft.com/en-us/library/jj612867.aspx

Filed Under: Deployment Tagged With: KMS

Using PowerShell to Set Properties on a List of Groups

posted on June 5, 2014

In a previous post on Using PowerShell to Get a List of Groups from Active Directory, I showed you how to get a list of groups and export it to a CSV file. Now that we’ve done that, I’ll show you how to use that data to feed another set of commands where you can edit the groups. If you work with Address Book Segregation or new Address Lists in Office 365, you’ll need to do this at some point so that the data populates.

Lets import the file we created in PowerShell in that last post and import it into the routine here.

Import-csv $filename | %{Set-ADGroup -Identity $_.SamAccountName -Replace @{extensionAttribute1="YourTextHere"} }

What we are doing is importing the CSV file and then for each line in the file (the % {} handles that), we are using the Set-ADGroup cmdlet using the SamAccountName column as our identity and replacing extensionAttribute1 with a string of “YourTextHere”. You can change anything you want on the group, name description, etc.

Note that I am using $filename for the filename value. You can also use a string, say “.\filename.csv” as that works fine as well. I often use $filename as I am usually doing this in a routine which runs daily and I am changing the filename based on date. In a future post I’ll share with you my user provisioning PowerShell script for Office 365 which licenses up the users.

Filed Under: Technology Tagged With: Office 365, Powershell

Using PowerShell to Get a List of Groups from Active Directory

posted on May 28, 2014

I’ve been busy the past bit manipulating my QA environment to better match the production environment. One of the things I’ve needed to do was pull a list of Active Directory (AD) groups from certain Organizational Units (OUs) and put them into a CSV file where I can then use it to do things like change the email domain, descriptions, etc.

The command you need is as follows, note you need to run this from a machine with the Active Directory PowerShell module installed on it.

$filename = ".\ExportedGroups.csv"
Get-ADGroup -Filter '*' | select-object * | where-object {$_.distinguishedname -like "*,OU=Container,*"} |Export-Csv -Path $filename

What the above script is doing using Get-ADGroup to grab the list of groups, selecting all the fields in the group, using a where-object to figure out which OU we want to use. The OU in this example is container but can be whatever you want or if you have OUs with the same name, then use more of the OU structure like “*,OU=Container,OU=Unique Parent Container,*”.

Finally we export the results to a file named ExportedGroups.csv which is located in the same file as the script.

Filed Under: Technology Tagged With: Active Directory

  • « Previous Page
  • 1
  • …
  • 7
  • 8
  • 9
  • 10
  • 11
  • …
  • 107
  • Next Page »

Recent Posts

  • Office 365 – Creating Custom SKUs
  • Setting a Default Printer in Windows 10
  • Deploying Windows to the Correct Drive in Configuration Manager
  • Surface Pro 4, Surface Dock and DVI Problems
  • Enabling UEV in Windows 10 1607

Recent Comments

  • Moore Details on Setting up a Delayed Charge in Quickbooks Online
  • MCP Exam Training on Using PowerShell to Get a List of Groups from Active Directory
  • Kac on Setting up an Office 2010 KMS Host Server
  • prabumedia.com | Pilih lisensi MAK atau MKS untuk aktifasi produk Microsoft ? on Setting up a KMS Server
  • prabumedia.com | Pilih lisensi MAK atau MKS untuk aktifasi produk Microsoft ? on Setting up an Office 2010 KMS Host Server

Archives

Categories

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org