Pages

Tuesday, July 21, 2015

Windows 10 Data Mining

Today I installed the latest (10240) Windows 10 Tech Preview build.

This is the RTM build that will be released to the general public on July 29.

A long time ago I made it a habit not to use Windows express settings … EVER.

Today it definitely paid up … after the build was installed, Windows went through the process of updating/optimizing all the apps on the computer and then took me through a short setup process.

Part of the process was customizing the Windows settings, with the standard two options: express or custom (this one in a smaller font somewhere at the bottom of the page).

Right on the first page there are some options that can be cataloged as Data Mining or key logging:

clip_image002

Fair to say that the vast majority of home/small business users will go for the express settings and in turn send vast amounts of personal/confidential data to Microsoft.

This begs the question of how the data is transmitted/stored (SSL, etc) and who’s got access to it.

Thursday, July 9, 2015

Use a Multiple Activation Key (MAK) instead of KMS activation

If KMS activation will not be used, and if there is no KMS server, the product key should be changed to a MAK. For Microsoft Developer Network (MSDN) the stock-keeping units (SKUs) that are listed below the media are usually volume licensed-media, and the product key that is supplied is an MAK key.
Change the product key to a MAK. To do this, follow these steps:

  1. Open an elevated Command Prompt
  2. If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.
  3. At the command prompt, type the following command, and then press Enter:

slmgr -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

clip_image001[4] Note In this command, the placeholder xxxxx-xxxxx-xxxxx-xxxxx-xxxxx represents your MAK product key.

  1. Next type the following commands:

slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

slmgr.vbs /ato

The first command will update the key.

The second command will activate Windows.

Export SCOM Management Packs

This script will export all management packs from SCOM to a file location.
The script was tested with SCOM 2012 R2.

Add-PSSnapin Microsoft.EnterpriseManagement.OperationsManager.Client -ErrorAction SilentlyContinue -ErrorVariable Err
Get-SCOMManagementPack -Name * | Export-SCOMManagementPack -Path <INSERT PATH>

Export list of computers from an OU to a .csv file

get-adcomputer -filter * -searchbase “OU=Test,DC=domain,DC=local" | select name | export-csv <INSERT PATH TO .CSV FILE>

Monday, July 6, 2015

Export AD group members to a .csv file

Get-ADGroupMember -identity "<INSERT GROUP NAME>" | select name | Export-csv -path <INSERT PATH TO .CSV FILE> -NoTypeInformation

Add list of users (by Display Name) to AD group from .csv file

This script will use a .csv file containing a list of users that need to be made members of an AD group. In this scenario only the display names are known, not the usernames.
The first cell in the column containing the user display names must use the value “Name”.

$ListOfUsers = Import-csv -Path <INSERT PATH TO .CSV FILE>
$ItemDetails = $NULL

foreach ($item in $ListOfUsers)
{
$a = $item.name
$ItemDetails = get-aduser -Filter {DisplayName -eq $a} -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
if (($ItemDetails.count) -gt 1)
{
Write-Host "Too many accounts with DisplayName $a" -ForegroundColor Yellow
}
else
{
if ($ItemDetails -eq $NULL)
    {
    Write-Host $a "does not exist in AD"  -ForegroundColor Red
    $ItemDetails = $NULL
    }
else
    {
    Write-Host $a  "does exist in AD" -ForegroundColor Green
    $ItemDetails.DistinguishedName
    $GroupToAddTo = get-adgroup -Identity "<INSERT GROUP NAME>"
    Add-ADGroupMember -Identity $GroupToAddTo -Member $ItemDetails.DistinguishedName
    $ItemDetails = $NULL
    }
}
}

Add list of users to AD group from .csv file

This script will use a .csv file containing a list of usernames that need to be made members of an AD group.
The first cell in the column containing the usernames must use the value “Name”.

$ListOfUsers = Import-csv -Path <INSERT PATH TO .CSV FILE>
$ItemDetails = $NULL

foreach ($item in $ListOfUsers)
{
$ItemDetails = get-aduser -Identity $item.name -properties * -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
if ($ItemDetails -eq $NULL)
    {
    Write-Host $item.name "does not exist in AD"  -ForegroundColor Red
    $ItemDetails = $NULL
    }
else
    {
    Write-Host $item.name  "does exist in AD" -ForegroundColor Green
    $ItemDetails.DistinguishedName
    $GroupToAddTo = get-adgroup -Identity "<INSERT GROUP NAME>"
    Add-ADGroupMember -Identity $GroupToAddTo -Member $ItemDetails.DistinguishedName
    $ItemDetails = $NULL
    }
}

Add list of computers to AD group from .csv file

This script will use a .csv file containing a list of computers that need to be made members of an AD group.
The first cell in the column containing the computer names must use the value “Name”.

$ListOfComputers = Import-csv –Path <INSERT PATH TO .CSV FILE>
foreach ($item in $ListOfComputers)
{
$ItemDetails = Get-ADComputer -identity $item.Name -properties * -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
if ($ItemDetails -eq $NULL)
{
Write-Host "$item does not exist in AD" -ForegroundColor Yellow
$ItemDetails = $NULL 
}
else
{
$ItemDetails.DistinguishedName
$GroupToAddTo = get-adgroup -Identity "<INSERT GROUP NAME>"
Add-ADGroupMember -Identity $GroupToAddTo -Member $ItemDetails.DistinguishedName   
}
}