icalcs – Backing up Permissions

Posted by robd on May 10, 2019
powershell, Server / No Comments

I wanted to make some changes to some permissions on mass today but decided it would be prudent to backup the permissions first.

So I used icals, to do this I first ran CMD as admin, then mapped the share drive with “Net Use“.

Why didn’t I do this on the server hosting the files?  UAC gets in the way and is a pain the bum.

To backup the permissions:

Swicthes:

/t – Performs the operation on all specified files in the current directory and its subdirectories.

/c – Continues the operation despite any file errors. Error messages will still be displayed.

Then to restore:

 

Tags: , ,

iPerf

Posted by robd on May 08, 2019
Networking / No Comments

I’ve been running iperf a lot recently, which is a tool to measure TCP, UDP and bandwidth performance across a network.  I’ve been running this specially from the users computer to a local server i.e. not across a WAN or MPLS etc.

The users computer has a 1GB connection to the switch and from there the switch is connected to the server via a 10GB NIC.

On the server I ran:

On the client I ran:

Below are my initial results, as you can see the connection is nearly maxing out its 1GB connection:

[ ID] Interval           Transfer     Bandwidth

[  4]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec             sender

[  4]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec             receiver

 

I then ran the same test but increasing the TCP connections to better simulate a heavy network application.  From the screen shot below the network is performing well.

So what do all the switches mean:

-t  option used in the above command tells to transfer data for 20 seconds.

-w will specify your desired window size value.  Whenever two machines are communicating with each other, then each of them will inform the other, about the amount of bytes it is ready to receive at one time. In other words, the maximum amount of data that a sender can send the other end, without an acknowledgement is called as Window Size.

-P 20 will increase the number of parallel TCP connections i.e. to 20 (Parallel TCP connections).

-R enabled reverse connections to and from the server

-I Changes the interval between periodic bandwidth tests. For example, -i 60 will make a new bandwidth report every 60 seconds. The default is zero, which performs one bandwidth test.

-B Binds iPerf to a specific interface or address. If passed through the server command, the incoming interface will be set. If passed through the client command, the outgoing interface will be set.

-i {time in seconds} #### update interval on screen; default is 1 second. Can be useful when running large numbers of concurrent tests to increase the interval, or disable with “-i 0”

–logfile {filename} #### outputs what would normally be in your terminal to a log file of your choosing.

 

Want to test QoS?  Specifically EF, then is the is bad boy:

 

Tags: , ,

Edit VMs using PowerShell and PowerCLI

Posted by robd on January 28, 2019
powershell, vmware / No Comments

To resize VMs using PowerShell with PowerCLI from a csv list, first install the software:

 

https://my.vmware.com/web/vmware/details?downloadGroup=PCLI650R1&productId=614

 

Then create a list of servers to resize and save it as a CSV file in C:\temp\VMs.csv:

 

 

Save the below as Something.PS1 and run from PowerCLI

Note: Change VCENTRE to your vCentre, this script will TURN THE SERVER OFF then give each VM two CPUs, one socket and 5GBs of RAM.

 

 

Tags: , ,

Orphaned VM in VMWare 6.5

Posted by robd on January 24, 2019
vmware / No Comments

Had an issue where I’d deleted a VMDK from a LUN and was left with orphaned VM in vSphere, no problem I thought…right click and remove from inventory.  The problem is, all options were greyed out:

So what to do?

Enable SSH on the host.

Connect wit Putty and run:

List all registered VMs

Then to unregistered:

 

Tags: , , ,

Group Policy for TPM 1.2 and 2.0

Posted by robd on January 23, 2019
Encyrption / No Comments

We have two GPO’s one for TPM 1.2 and one for TPM 2.0, the reason being is TPM 1.2 is not compataible with 256 encryption.

 

Here’s a handy table Dell have produced:

https://www.dell.com/support/article/us/en/04/sln312590/tpm-12-vs-20-features?lang=en

Algorithm Type Algorithm Name TPM 1.2 TPM 2.0
Asymmetric RSA 1024 Yes Optional
RSA 2048 Yes Yes
ECC P256 No Yes
ECC BN256 No Yes
Symmetric AES 128 Optional Yes
AES 256 Optional Optional
Hash SHA-1 Yes Yes
SHA-2 256 No Yes
HMAC SHA-1 Yes Yes
SHA-2 256 No Yes

 

We then use WMI filtering to distinguish TPM 1.2 from 2.0.

 

The TPM 1.2 WMI filter:

Namespace:

Query:

 

The TPM 2.0 WMI filter:

Namespace:

Query:

 

Tags: , ,

Client Connecting to WLAN on Cisco WLC

Posted by robd on January 22, 2019
Wireless / No Comments

Hi All,

Had a issue with users connecting to a WLAN on the virtual controller i.e. my mobile phone (94:65:2d:29:00:00) wouldn’t connect to standard PSK SSID.

So I ran the following on the console:

Then tried to connect and had the following results:

The bottom line looked like the issue was a client connection limit per WLAN so I had a look on the console and found:

 

Changed it to 0 and BOOM.

Tags: ,

Azure – Linux – Change the time and time zone

Posted by robd on December 22, 2018
Linux, Server / No Comments

As you may have seen we have a Linux server in Azure running some weird stuff, anyhow the time was off screwing with reports and what not, so had to fix it.  Here’s what I did:

First, SSH onto the server and logon.

Check the time:

Find the timezone you would like:

Now change it:

Check it again:

Example:

Tags: , ,

Work Folders – more fun

Posted by robd on December 20, 2018
Work Folders / No Comments

Recently set up more work folder syncs, seemed to work well then tragedy happened and it broke….well it broke for one sync share and all its users:

The disks on the server are setup as a cluster, so failed the disks to the second cluster which has worked in the past i.e. force the sync service to start again…no luck.

So next I found a reg setting that will allow Work Folders to support up to 16 Sync Shares per Work Folders server.

The default number of JET databases that can be opened simultaneously is 16 per server.

You can increase the number of JET databases by creating the EseParameterSettings registry value under the following key:

Value: EseParameterSettings
Type: REG_MULTI_SZ
Data:

For JET_paramMaxInstances, the maximum value is 1024.

After creating the registry value, restart the Windows Sync Share (SyncShareSvc) service.

This is where I had some more issues.  The service just said “Stopping”, so fix this looked at the service and its called “svchost.exe”:

Looking in task managed there’s loads of svchost.exe files so check what the service is running as and then end the task that is accosicated to that user:

Boom, service stopped.

Start it up again…..no luck.

So at this point I was irritated, so I renamed the sync share folder and deleted the syncshare:

After that I re-created the folder and setup the share, PAYING VERY CLOSE ATTENTION TO THE FOLDER PERMISSIONS!!!

Then created the share:

Well it still wasnt working, so I logged on as one the users and manually created their folder in the share location and all of a sudden it started working….I’m going to test a new user shortly to see if it creates the folders itself.

Tags:

Azure – Linux OS Partition

Posted by robd on December 15, 2018
Server / No Comments

Had an annoying issue where the OS disk on a linux server (hosted on Azure) was partitioned too small:

This disk is 30GB but has loads of free space::

Then partition /dev/sda2 on the disk: 

Feespace:

Here’s how I managed to grow the disk without loosing any data etc:

1) Login to the VM using SSH, we can check the size of the disk by using:

2) To proceed with the partition resize, we will use:

type: p
this will show both partitions /dev/sda1 and /dev/sda2 which are basically partitions 1 and 2

type: d then 2 (to delete partition 2)
type: n then p2 (to recreate partition 2) you can accept the default values
type: w (to save the new partition)
type: q (to exit fdisk)
sudo reboot (to reboot the VM so the partition is updated)

3) To finalize the resize, after the reboot, execute the command:

For Red Hat 7.3 and CentOS 7.3:

For Oracle 7.3:

 

Tags: ,

Copy Protected by Chetan's WP-Copyprotect.