Monday, April 7, 2014

Add MS updates from a patched system to a Windows Image using DISM

Hi guys,

today I will show you how to integrate updates into your WIM file using a patched system. For this you need a "clean" patched system, i.e. a virtual machine. Follow the attached steps to get your image up to date.

Install all needed Updates on a clean system, so you can use this machine to get the needed updates for your image.

On your admin workstation create a "mount" folder in C:\. Then copy your image to "C:\Images\Win7\install.wim", after this run the attached UpdateWIM.bat to integrate the updates.

UpdateWIM.bat

dism /mount-wim /wimfile:”C:\Images\Win7\install.wim” /mountdir:C:\mount /index:1
Start /w for /R \\PATCHEDComputer\C$\Windows\SoftwareDistribution\Download\ %f in (*.cab) do dism /image:C:\mount /add-package /packagepath:”%U”
dism /unmount-wim /mountdir:C:\mount /commit
pause


Now your image is up to date and you can upload it to your server. You can also directly mount your image that is located on the server, only change the path ”C:\Images\Win7\install.wim”

Friday, March 21, 2014

Provisioning computers in Active Directory using Powershell

This post will show you how to be able to provisioning/pre-staging computers from a list by using a Powershell script. You need to specify the computer name and the MAC adress in the csv file and after that you can execute the script.

You have to modify the orange text in the script to your AD dn. If you remove this part computers will be created in the "Computers" OU.


Powershell Script

import-module Activedirectory

import-csv "C:\PSScripts\Computer.csv" | foreach-object{

    $name = $_.Name
    $MAC = $_.Mac 
  
    $CheckExists = get-adobject -Filter {(ObjectClass -eq "computer") -and (Name -eq $name)}  #it´s $NULL if the computer doesn´t exist
  
      
    if ($CheckExists -eq $NULL){
        [guid]$nbGUID = "00000000-0000-0000-0000-$MAC"  # transform MAC to netbootGUID
        new-adcomputer -Name $name -SamAccountName $name -Path "OU=Systems,DC=directoryadmin,DC=blogspot,DC=com" -OtherAttributes @{'netbootGUID'=$nbGUID}       
        write-host $name " - " $nbGUID
      }
      else {
        write-host "$name already in use."
        }
      
}


Computer.csv located in C:\PSScripts\

Name,Mac
computer1,A088B44642A8
computer2,A088A44642B8



Monday, February 24, 2014

Earning Bitcoins for free everyday

On top of the free daily coins you receive (see below), we've credited a one-time0.00000250 to your Bitcoin balance, 0.00007672 to your Litecoin balance, 0.00604839 to your FeatherCoin balance, 97.85271991 to your FedoraCoin balance and 5.68181818 to your InfiniteCoin balancesimply for signing up. It's our way of saying "Thank you".

Every day (including weekends) the following coins will automatically be added to
your (and your friends) balances:

Bitcoin: 0.00000001 BTC * Bonuses
Litecoin: 0.00000031 LTC * Bonuses
FeatherCoin: 0.00002419 FTC * Bonuses

Follow the Link to earn this.

Regards,
Tim

Friday, February 21, 2014

Solving slow syncing for MAC OS X Mavericks 10.9.x Mobile Accounts using a share on Windows Server 2008 or 2012



Hi guys,

hope I can help some admins with this. It was not easy to figure this out...

1. The share
- For security reasons remove the "User" group from the disks ACL, if you don´t do this every MAC User could see the other shares. 
- Use a root folder for the share like D:\MACProfiles.
- Create the share "\\APPLEFS01\MACProfiles"
- On "Advanced Sharing", "Permissions" give Everyone FULL CONTROL.
- Give Browsing rights on the share folder for Authenticated Users or a special AD group.
- After this go to "Share and Storage Management", right-click on the created share and click on "Advanced". Select the "Caching" tab and select "No files or programs from the share are available offline".


2. SMB Server Settings
- Cause MAC OS X Mavericks has problems if SMB V2 or V3 is used on the server, you have to force SMB V1 on the Windows Server. Find attached the Powershell commands to do this.

For WS 2008


Set-SmbServerConfiguration -EnableSMB2Protocol $false
Set-SmbServerConfiguration -EnableSMB1Protocol $true

Restart the server.
 

For WS 2012


Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 -Force
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 1 -Force


3. AD User object profile path for MAC User.
- For MAC Profiles you have to select the home folder, not the profile path in ADUC. I used the IP address cause we are having a mixed domain environment, so its working faster with the profile sync. The path should be like \\10.0.0.10\MACProfiles\MACUser1.


4. Notes
- User should not save APPS on there profile, because the directory depth inside the APPS is very long and this will cause a long sync/check time.
- If a user logoff, he should restart or shutdown the MAC, cause this will close all opened sessions to the server.
- Ports must be opened between the client LAN and the Servers.

Accessing an AD with MAC OS X: Troubleshooting Binding Issues / Login Issues

- Time Configuration

The AD binding uses Kerberos for authentication, and if the MAC system clock slips beyond the five-minute tolerance, the authentication will fail and the user can´t log on. Set the Domain Controller as time source on the client, to avoid this problem!


- Confirming DNS

Check DNS Services

MACclient1:~ cadmin$ host -t SRV _ldap._tcp.YourDomain.com
_ldap._tcp.YourDomain.com has SRV record 0 100 389 DC01.YourDomain.com.

MACclient1:~ cadmin$ host -t SRV _kerberos._tcp.YourDomain.com
_kerberos._tcp.YourDomain.com has SRV record 0 100 88 DC01.YourDomain.com.

MACclient1:~ cadmin$ host -t SRV _kpasswd._tcp.YourDomain.com
_kpasswd._tcp.YourDomain.com has SRV record 0 100 464 DC01.YourDomain.com.

MACclient1:~ cadmin$ host -t SRV _gc._tcp.YourDomain.com
_gc._tcp.YourDomain.com has SRV record 0 100 3268 DC01.YourDomain.com.


- Check Service Ports

LDAP
MACclient1:~ cadmin$ telnet DC01.YourDomain.com 389
Kerberos
MACclient1:~ cadmin$ telnet DC01.YourDomain.com 88
Kpasswd
MACclient1:~ cadmin$ telnet DC01.YourDomain.com 464
GC
MACclient1:~ cadmin$ telnet DC01.YourDomain.com 3268
DNS
MACclient1:~ cadmin$ telnet DC01.YourDomain.com 53


-