Local Group Policy deployment for non domain computers

How to create a local policy and deploy it to non-domain computers

1. Create local group policy
a. run mmc
b. add group policy object editor snap in with the local computer as policy object
c. add necessary administrative templates
d. define settings
e. close the policy object editor as to create, save and apply the policy to the local computer

2. Copy local policy
the created local group policy is to be found under:
%windir%\system32\group policy\
(this is by default a hidden folder)

copy the group policy folder with all subfolders and files in it

paste it into the same place on the computer you want to have these settings applied to

the policy will take effect on next restart

keep in mind that the local policy is the first to be applied so it is overwritten by any other policies that may be defined for this machine

3. Remove policy
if the policy is no longer necessary it is not enough to remove or delete the Group Policy folder as the settings are retained in the windows registry

if you know what the settings are then you can edit them into whatever value is required

otherwise run the local group policy object editor again (as in step 1) and reset all settings back to NOT CONFIGURED

restart the workstation and check to see if the settings are returned to their defaults


How to Export Local Group Policy Settings Made In gpedit.msc.

To export group policy you made in on a machine with the Local Group Policy Editor (gpedit.msc) to other machines follow following steps.

1.) Open %systemroot%\system32\grouppolicy\

Within this folder, there are two folders – “machine” and “user”. Copy these to folders to the “%systemroot%\system32\grouppolicy – folder on the target machine. All it needs now is a reboot or a “gpupdate /force”.

Note: If you cannot see the “grouppolicy” folder on either the source or the target machine, be sure to have your explorer folder options set to “Show hidden files and folders”…

For security settings:

1.) Open MMC and add the Snapin “Security Templates”.

2.) Create your own customized template and save it as an “*inf” file.

3.) Copy the file to the target machine and import it via command line tool “secedit”:

secedit /configure /db %temp%\temp.sdb /cfg yourcreated.inf


How to include a Custom Script in a Windows PE Image

You can launch a customized shell application by using a file called Winpeshl.ini. Winpeshl.exe will process the settings in Winpeshl.ini during boot. If you create a customized Winpeshl.ini and require Plug and Play or network support, you must include a call to Wipeinit.exe. Wpeinit.exe specifically installs Plug and Play devices, processes Unattend.xml settings, and loads network resources.

  • Create a customized Windows PE image, use the following steps.
  • Create a text file called Winpeshl.ini by using a text editor (such as Notepad) with the following structure. For example,

[LaunchApp]
AppPath = %SYSTEMDRIVE%\myshell.exe
[LaunchApps]
%SYSTEMDRIVE%\mydir\application1.exe, -option1 -option2
application2.exe, -option1 -option2

  • Set the AppPath entry to the path to your shell application. The path can either be fully qualified or use environment variables, such as %SYSTEMROOT%\System32\Myshell.exe. The AppPath entry does not support command-line options.
  • Save the file to %SYSTEMROOT%\System32 of your customized Windows PE image.
  • Recapture your Windows PE image .

More Details


How to add a Device Driver to an Offline Windows PE Image

To add a device driver to an offline Windows PE image
Apply the base image (Winpe.wim) by using ImageX to a local Windows PE directory. For example:
imagex /apply WinPE.wim 1 c:\winpe_x86\mount\
-OR-
imagex /mountrw WinPE.wim 1 c:\winpe_x86\mount\
Add the .inf file to the base image by using the peimg /inf command. For example:
peimg /inf= c:\winpe_x86\mount\Windows
where is the location of the .inf file.
Repeat steps 1 and 2 for each additional device driver.
When you finish customizing the image, prepare the image for deployment by using the peimg /prep command.
More details


Useful Tips For Excel Keyboard Shortcuts

Useful Tips For Excel Keyboard Shortcuts

1. To format any selected object, press ctrl+1
2. To insert current date, press ctrl+;
3. To insert current time, press ctrl+shift+;
4. To repeat last action, press F4
5. To edit a cell comment, press shift + F2
6. To autosum selected cells, press alt + =
7. To see the suggest drop-down in a cell, press alt + down arrow
8. To enter multiple lines in a cell, press alt+enter
9. To insert a new sheet, press shift + F11
10. To edit active cell, press F2 (places cursor in the end)
11. To hide current row, press ctrl+9
12. To hide current column, press ctrl+0
13. To unhide rows in selected range, press ctrl+shift+9
14. To unhide columns in selected range, press ctrl+shift+0
15. To recalculate formulas, press F9
16. To select data in current region, press ctrl+shift+8
17. To see formulas in the worksheet, press ctrl+shift+` (ctrl+~)
18. While editing formulas to change the reference type from absolute to relative vice versa, press F4
19. To format a number as currency, press ctrl+shift+4 (ctrl+$)
20. To apply outline border around selected cells, press ctrl+shift+7
21. To open the macros dialog box, press alt+F8
22. To copy value from above cell, press ctrl+’
23. To format current cell with comma formats, press ctrl+shift+1
24. To go to the next worksheet, press ctrl+shift+pg down
25. To go to the previous worksheet, press ctrl+shift+pg up


How to change a file’s owner and group in Linux

You can change the owner and group of a file or a directory with the chown command. Please, keep in mind you can do this only if you are the root user or the owner of the file.

Set the file’s owner:
chown username somefile
After giving this command, the new owner of a file called somefile will be the user username. The file’s group owner will not change. Instead of a user name, you can also give the user’s numeric ID here if you want.

You can also set the file’s group at the same time. If the user name is followed by a colon and a group name, the file’s group will be changed as well.
chown username:usergroup somefile
After giving this command, somefile‘s new owner would be user username and the group usergroup.

You can set the owner of a directory exactly the same way you set the owner of a file:
chown username somedir
Note that after giving this command, only the owner of the directory will change. The owner of the files inside of the directory won’t change.

In order to set the ownership of a directory and all the files in that directory, you’ll need the -R option:
chown -R username somedir
Here, R stands for recursive because this command will recursively change the ownership of directories and their contents. After issuing this example command, the user username will be the owner of the directory somedir, as well as every file in that directory.

Tell what happens:

chown -v username somefile
changed ownership of 'somefile' to username

Here, v stands for verbose. If you use the -v option, chown will list what it did (or didn’t do) to the file.

The verbose mode is especially useful if you change the ownership of several files at once. For example, this could happen when you do it recursively:

chown -Rv username somedir
changed ownership of 'somedir/' to username
changed ownership of 'somedir/boringfile' to username
changed ownership of 'somedir/somefile' to username

As you can see, chown nicely reports to you what it did to each file.