Articles tagged with: System Administration

Using the Set-ExecutionPolicy Cmdlet

Changing the Windows PowerShell Script Execution Policy
The Set-ExecutionPolicy cmdlet enables you to determine which Windows PowerShell scripts (if any) will be allowed to run on your computer. Windows PowerShell has four different execution policies:

  • Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode.
  • AllSigned – Only scripts signed by a trusted publisher can be run.
  • RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.
  • Unrestricted – No restrictions; all Windows PowerShell scripts can be run.

To assign a particular policy simply call Set-ExecutionPolicy followed by the appropriate policy name. For example, this command sets the execution policy to RemoteSigned:

Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned

Loading

Centos Sıkılaştırma

  • Proxy kullanılıyor ise tanımlanır:

export http_proxy=http://proxyserver:portnumber
export https_proxy=http://proxyserver:portnumber
export ftp_proxy=http://proxyserver:portnumber

  • Update yapılır:

yum update -y

  • ssh ayarları yapılır:

Loading

Change or setup default gateway with route command in linux

$ /sbin/route -n

Output:

Kernel IP routing table
Destination           Gateway              Genmask                 Flags       Metric        Ref       Use         Iface
191.255.255.0     0.0.0.0                  255.255.255.0       U             0                0           0            eth0
169.254.0.0         0.0.0.0                  255.255.0.0           U             0                0           0            eth0
0.0.0.0                 191.255.255.1     0.0.0.0                    UG           0                0           0            eth0

Please note that a destination entry 0.0.0.0 (or default) is the default gateway.
In above example 191.255.255.1 is a default gateway.

Loading

How to install .NET Framework 3.5 on Windows Server 2012

Apparently, there’s a bug in Windows Server 2012 when trying to add the .NET Framework 3.5 from Server Manager. In order to get it to work, I had to enable the feature via the Command Prompt.

This is the command that I had to type:

dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess

Note-1: Source should be the Windows installation disc. In my case, this was located on D:
Note-2: CMD or powershell must be administrator rights.

Loading

Virtualbox installation error on ubuntu “Kernel driver not installed (rc=-1908)”

Easy way to install virtualbox on Ubuntu

root:~# sudo dpkg-reconfigure virtualbox-dkms dpkg-query

dpkg-query: package ‘virtualbox-dkms’ is not installed and no information is available
Use dpkg –info (= dpkg-deb –info) to examine archive files,
and dpkg –contents (= dpkg-deb –contents) to list their contents.
/usr/sbin/dpkg-reconfigure: virtualbox-dkms is not installed

Loading

What’s New in Windows Server 2012 Active Directory

You can divide the “what’s new” categories in Windows Server 2012 Active Directory into two roughly equal parts: brand new and merely improved. Either way, you’re going to like what you see.

New Features
Pundits, bloggers and journalists alike will be diving into these details for months to come. Let’s take a look at the new high-level features, starting with the brand-new functions:

GUI for Recycle Bin
Microsoft introduced the Active Directory Recycle Bin in Windows Server 2008 R2, but it was limited by its Windows PowerShell-only exposure. This time it gets a GUI.

GUI for Fine-Grained Password Policies
Also gaining a GUI are fine-grained password policies.

Loading

Find any word in linux system

I want to find in my linux system for example, “welcome to” the word. I’m doing the following on the command line for this query.

grep -r -e “Welcome to” /opt/otrs/

Output screen:

/opt/otrs/Kernel/Language/sl.pm:                ‘Welcome to %s’ => ‘Dobrodošli na %s’,
/opt/otrs/Kernel/Language/et.pm:                ‘Welcome to %s’ => ‘Tere tulemast %s’,
/opt/otrs/Kernel/Language/ar_SA.pm:        ‘Welcome to %s’ => ‘مرحباً بك في %s’,
/opt/otrs/Kernel/Language/lt.pm:                 ‘Welcome to %s’ => ‘Sveiki atvykę į %s’,
/opt/otrs/Kernel/Language/sk_SK.pm:       ‘Welcome to %s’ => ‘Vitajte v %’,
/opt/otrs/Kernel/Language/ru.pm:               ‘Welcome to %s’ => ‘Добро пожаловать в %s’,
/opt/otrs/Kernel/Language/hu.pm:              ‘Welcome to %s’ => ‘Üdvözli az %s’,
/opt/otrs/Kernel/Language/ca.pm:              ‘Welcome to %s’ => ‘Benvingut a %s’,

Then find related link. Doing the required correction with the help of an editor.

vi /opt/otrs/Kernel/Language/sl.pm

Loading

Windows Server 2012 Recycle Bin Özelliği

Active Directory Recycle Bin özelliği Windows Server 2008 R2 ile gelen bir yeniliktir. Temel olarak Active Directory altında bulunan nesnelerin silinmesi durumunda kolay bir şekilde tekrar geri getirilebilmesi amaçlanmıştır. Daha önceki işletim sistemlerinde bu işlemi yapabilmek için sunucuyu restart edip F8 tuşu ile Directory Service Restore modunda açıp gerekli işlemleri yapıyorduk. Windows Server 2008 ile bu işlemi çok daha basit şekilde yapabilmekteyiz. Bu özelliği kullanabilmek için Forest Functional Level seviyesinin minimum Windows Server 2008 olması gerekmektedir ve default olarak disable konumunda gelmektedir. Bu makalede de Windows Server 2012 ile bu özelliği nasıl aktif hale getirip çalıştırabileceiğimi göreceğiz.

Loading