Tuesday, August 18, 2015

How to check your SID using PsGetSid

As more and more people using virtualization, they face the problems like having two same SIDs on the network. NewSid is officially not supported by Microsoft anymore, so your virtual machine who’s SID was changed with NewSid is not supported anymore. Microsoft recommends using sysprep as a method to change SID on your operating system. I’ll show you how to use it in my next post, but today I’ll show you how easy is to check your SID, using free tool from Sysinternals called PsGetSid.
First you have to download PsGetSid from PsGetSid download page. Then extract it from the archive PsTools (for example on your desktop). You’ll see PsGetSid among the other PsTools.
PsTools_folder
Using Command Prompt navigate to that folder, and use simple command:
psgetsid COMPUTERNAME
where COMPUTERNAME is the name of your computer.
PsGetSidIn my case I used psgetsid WS2008R2-3.

Usage:

Also, there are other possibilities, and usage is as follows:
Usage: psgetsid [\\computer[,computer[,...] | @file] [-u username [-p password]]] [account|SID]
PsGetSid works for sure on Windows Server 2008 R2 , but it should work also on Windows XP, Windows Server 2003, Windows Vista, Windows 7…

How to change SID on Windows 7 and Windows Server 2008 R2 using sysprep


How to change SID on Windows Server 2008 R2 and Windows 7 using sysprep.

I see many of you are looking how to change SID using NewSID, but New SID is not officially supported by Microsoft. You could use NewSID on Windows Server 2008, but when you try to use it on Windows Server 2008 R2 it won’t work, actually, it will “destroy” operating system. I didn’t test it on Windows 7, but still my advice is to use sysprep. Changing SID using sysprep is also very simple, just follow few steps as described below…
I tested sysprep on Windows Server 2008 R2 Datacenter edition, but same steps apply for Windows7 also.
First, click to Start->Run, type sysprep and press OK.
sysprep1

This will open sysprep folder which is located in c:\Windows\System32. Open sysprep application.
sysprep2

This will open System Preparation Tool 3.14 window. As a System Cleanup Action select Enter System Out-of-Box Experience (OOBE). Important: select Generalize if you want to change SID, it’s not selected by default. As Shutdown Options selectReboot.
sysprep3

It will take some time for sysprep to finish, so grab a cup of coffee and wait.
sysprep4

After rebooting you’ll have to enter some data, for example, Country or region, Time and currency and Keyboard input.
sysprep5

Also, you’ll have to accept EULA. And that’s it. After booting, in Server Manager you’ll see that everything is changed, if you had some settings set now they’re changed.
sysprep6

Now you can again use PsGetSid to check that your OS has new SID.

Wednesday, February 18, 2015

Configure Software RAID

Configure Software RAID 0

Step 1

Connect to PLABDM01 and minimize Server Manager Dashboard. Click on PowerShell icon on taskbar. You will prepare Disks 1, 2, and 3 for storage which will be used later.
RAID 0 is also called disk striping. This will not provide redundancy as RAID 1 and 5, but it will enhance disk throughput for read operations of files like databases.
To prepare Disk 1, type the following commands:
diskpart
list disk
select disk 1
online disk
attributes disk clear readonly
create partition primary size=10236
convert dynamic
Practice-Labs-Image
To prepare Disk 2, type the following:
list disk
select disk 2
online disk
attributes disk clear readonly
create partition primary size=10236
convert dynamic
Practice-Labs-Image
To prepare Disk 3, type the following:
list disk
select disk 3
online disk
attributes disk clear readonly
create partition primary size=10236
convert dynamic
Practice-Labs-Image
Minimize Windows PowerShell. Go to Administrative Tools and click on Computer Management. Right-click on Disk 1’s unallocated partition and choose New Striped Volume…
Practice-Labs-Image
On Welcome to the New Striped Volume Wizard, click Next.
Practice-Labs-Image
On Select Disks page, in Available list box, click on Disk 2 and Disk 3and choose Add.
From Select the amount of space in MB, type 500.
Click Next.
Practice-Labs-Image
On Assign Drive Letter or Path, click Next to accept the default.
Practice-Labs-Image
On Format Volume, click Next.
Practice-Labs-Image
Click Finish to close Completing the New Striped Volume Wizard.
Practice-Labs-Image

Configure RAID 1

RAID 1 also known as disk mirroring is useful for protecting operating system data as it creates an exact replica of the parent hard disk.

Step 1

From PLABDM01, go to Disk 0 and right-click on (C:) and choose AddMirror…
Practice-Labs-Image
On Add Mirror dialogue box, Disk 1 is automatically selected for you. Click Add Mirror.
Practice-Labs-Image
Disk Management will prompt you that this operation will convert Disk0 to dynamic disk. Click Yes to continue.
Practice-Labs-Image
The creation of disk mirror volume will take a few moments, as data on drive C is synched with the selected replica disk.
Practice-Labs-Image

Configure RAID 5 Volume

RAID 5 volume is known as disk striping with parity. This type of disk volume requires at least 3 hard disks with unallocated partitions of the same size. It protects data written on a RAID 5 volume by creating parity bits which can be used by Windows to recreate lost data in the event one of the three disks in a RAID 5 volume fails.
RAID 5 can be used for protecting files like databases by providing fault tolerance.

Step 1

From PLABDM01, Go to Disk 1 and right-click on the unallocated partition and choose New RAID-5 Volume…
Practice-Labs-Image
Click Next on Welcome to the New RAID-5 Volume Wizard.
Practice-Labs-Image
On Select Disks page, under Available list box, select Disk 2 and Disk 3and click Add.
In Select the amount of space in MB, type 700
Click Next.
Practice-Labs-Image
From Assign Drive Letter or Path, accept the default settings by clickingNext.
Practice-Labs-Image
On Format Volume page, choose Next.
Practice-Labs-Image
Select Finish to close Completing the New RAID-5 Volume Wizard.
Practice-Labs-Image

Creating Extended Volumes

Volume sets or extended volumes can be used for combining unallocated free space in found in different hard disks to create a bigger storage space.
An existing volume set can be expanded by including unallocated free space if a new hard disk was added to the system.

Step 1

From PLABDM01, go to Disk 1 and right-click on the 10.00 GB RAWpartition and choose Extended Volume…
Practice-Labs-Image
Select Next in Welcome to the Extended Volume Wizard page.
Practice-Labs-Image
On Select Disks page, under Available list box, select Disk 2 and Disk 3and click Add. Choose Next.
Practice-Labs-Image
Click Finish to close Completing the Extend Volume Wizard screen.
Practice-Labs-Image
To prepare this extended volume to store data files, right-click on Disk1’s 10.00 GB RAW and choose Change Drive Letter or Path…
Practice-Labs-Image
From Change Drive Letter and Paths dialogue, click Add…
Practice-Labs-Image
Click OK in Accept the default drive letter indicated in Add Drive Letter or Path dialogue box.
Practice-Labs-Image
Finally, there is a prompt to format G to prepare it for data storage. Select Format disk.
Practice-Labs-Image
On Format Local Disk (G:) dialogue, click Start and choose OK to proceed with formatting.
Note: You will notice some time lag with formatting this extended volume as synchronisation of disk mirror is on-going.
Practice-Labs-Image
Click OK again when formatting is complete.
Practice-Labs-Image

Configuring Offline Data Access

Configuring Offline Data Access

In this exercise, you will enable offline data access on Windows Server 2008 R2.

Step 1

Connect to PLABDM01 and click PowerShell icon on taskbar and type
Import-Module Servermanager
Add-WindowsFeature –Name Desktop-Experience
Shutdown /r /t 0
Practice-Labs-Image
Give PLABDM01 about 1 minute to restart before reconnecting to it.
Log back on to PLABDM01, click Start and in Search programs andfiles box, type sync center and press Enter.
Practice-Labs-Image
From Sync Center, go to left navigation bar and click on Manageoffline files.
Practice-Labs-Image
From Offline Files dialogue box, click Enable offline files and then select OK.
Practice-Labs-Image
When asked to restart computer, click Yes. Reconnect to PLABDM01after 1 minute.
Practice-Labs-Image

Create Shared Folder

Step 1

On PLABDM02, open Windows Explorer. Click on drive C and create a folder called Marketing, then create a file inside this folder calledMarketing Plans.
Open Marketing Plans.
Practice-Labs-Image
From Marketing Plans window and type a one-liner text:
Version 1 for offline testing.
Save and close Marketing Plans.
Practice-Labs-Image
Right-click on Marketing and choose Properties.
Practice-Labs-Image
On Marketing Properties page, click Advanced Sharing…
From Advanced Sharing, select Share this folder and clickPermissions.
Practice-Labs-Image
On Permissions for Marketing, select Allow – Full Control. Click OKtwice.
Practice-Labs-Image
On Marketing Properties, go to Security tab and click Edit…
Practice-Labs-Image
On Permissions for Marketing, select Users (PLABDM02\Users) and click Allow – Modify. Click OK and then Close.
Practice-Labs-Image

Managing Offline Files

Step 1

On PLABDM01, map a network drive to
\\PLABDM02\marketing
Click Finish.
Practice-Labs-Image
From Windows Explorer, go to mapped network connection. Right-click on Marketing Plans and choose Always available offline.
The system will setup this folder for offline access.
Practice-Labs-Image

Step 2

Go back to Practice Labs web application. From the left navigation bar, select PLABDM02 and choose Suspend this device button. Wait for 1 minute to fully suspend PLABDM02 device.
Practice-Labs-Image

Step 3

Connect to PLABDM01 and open Sync Center.
Right-click on Offline Files icon and choose Open.
Practice-Labs-Image
Right-click on marketing (\\PLABDM02) and choose Browse contentsof marketing (\\PLABDM02).
Practice-Labs-Image
From Windows Explorer, right-click on Marketing Plans and chooseOpen.
Practice-Labs-Image
You have access to Marketing Plans file while PLABDM02 is offline from the network.
Practice-Labs-Image
Shut down all the virtual machines to revert them to their default settings.