RSS

Category Archives: Uncategorized

HikVision devices Naming Rules

 
Leave a comment

Posted by on June 2, 2021 in Uncategorized

 

Bulk add alias in Microsoft 365 Exchange using powershell.

The following steps will add a new alias to given emails. It will not make the new alias as primary.

  1. Open a persistant session to the exchange.
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

02.Import the session to your powershell:
Import-PSSession $Session

03.Login to Microsoft 365 admin account
Connect-Msolservice

  1. Download Global address list.
    get-user -resultsize unlimited |select * |export-csv c:\M365\users.csv
  2. Delete all columns except “Identity”.
  3. Add a new column named “Alias”.
  4. After updating the sheet run the following script.

$Recipients = Import-Csv C:\M365\users.csv
Foreach ($Item in $Recipients)
{
Set-Mailbox -Identity $Item.Identity -EmailAddresses @{Add=$Item.Alias}
}

(This note is based on what I did today. I have very little understanding of powershell, if you are going to try these steps please do your research first.)

 
Leave a comment

Posted by on May 31, 2021 in Uncategorized

 

Bulk Update User information in Microsoft 365 Exchange using powershell.

Note for future reference:

  1. Open a persistant session to the exchange.
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

It will ask for your credentials.

  1. Import the session to your powershell:
    Import-PSSession $Session
  2. Login to Microsoft 365 admin account (to use MsolUser Cmdlet)
    Connect-Msolservice (It will ask for your credentials.)
  3. Download the contents of your Exchange Global Address list to a CSV file
    get-user -resultsize unlimited |select * |export-csv c:\MS365\users.csv
  4. Remove unneccessry columns and edit what you need. (dont delete the columns named UserPrincipalName and Identity we need to use them later.)
    In this usecase I will use Set-MsolUser module, which supports the following options.

Set-MsolUser
[-ImmutableId ]
[-ObjectId ]
[-UserPrincipalName ]
[-BlockCredential ]
[-City ]
[-Country ]
[-Department ]
[-DisplayName ]
[-Fax ]
[-FirstName ]
[-LastName ]
[-LastPasswordChangeTimestamp ]
[-MobilePhone ]
[-Office ]
[-PasswordNeverExpires ]
[-PhoneNumber ]
[-PostalCode ]
[-PreferredDataLocation ]
[-PreferredLanguage ]
[-SoftDeletionTimestamp ]
[-State ]
[-StreetAddress ]
[-StrongPasswordRequired ]
[-Title ]
[-UsageLocation ]
[-AlternateEmailAddresses ]
[-StrongAuthenticationMethods ]
[-AlternateMobilePhones ]
[-StrongAuthenticationRequirements ]
[-StsRefreshTokensValidFrom ]
[-UserType ]
[-TenantId <Guid>]

  1. After updating the CSV, import the updated csv to powershell and execute the changes.

in the below script, header names referenced with a hyphon are the names we used in our sheet. header names referenced with $_. are the ones that the exchange is expecting from us. To make it simpler I used the same names as exchange in my sheet.

to map a field to a field in exchange we use this syntax : – $_.

Import-Csv C:\M365\users.csv | foreach{Set-MsolUser -UserPrincipalName $_.UserPrincipalName -DisplayName $_.DisplayName -FirstName $_.FirstName -LastName $_.LastName -City $_.City -StreetAddress $_.StreetAddress -Department $_.Department -Country $_.Country -MobilePhone $_.MobilePhone}

supported field names are shown in step 5.

In this script we are using UserPrincipalName as the main reference.

After running this script it takes a few minutes to be able to see your changes in the Exchange Admin portal.

(This note is based on what I did today. I have very little understanding of powershell, if you are going to try these steps please do your research first.)

 
Leave a comment

Posted by on May 31, 2021 in Uncategorized

 

EXCEL: How to get number from any position in a string

Copy pasting as found on another website for future reference. (Link to website)

If your task implies extracting number from anywhere in a string, you can make use of the following mind-boggling formula published on MrExcel forum:

=SUMPRODUCT(MID(0&A2, LARGE(INDEX(ISNUMBER(--MID(A2, ROW(INDIRECT("1:"&LEN(A2))), 1)) * ROW(INDIRECT("1:"&LEN(A2))), 0), ROW(INDIRECT("1:"&LEN(A2))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(A2)))/10)

Where A2 is the original text string.

Breaking down this formula would require a separate article, so you can simply copy it to your worksheet to make sure it really works 🙂
Formula to get number from any position in a string

Upon examining the results, however, you may notice one insignificant drawback – if the source string does not contain a number, the formula returns zero, as in row 6 in the screenshot above. To fix this, you can wrap the formula in the IF statement, the logical test of which checks if the source string contains any number. If it does, the formula extracts the number, otherwise returns an empty string:

=IF(SUM(LEN(A2)-LEN(SUBSTITUTE(A2, {"0","1","2","3","4","5","6","7","8","9"}, "")))>0, SUMPRODUCT(MID(0&A2, LARGE(INDEX(ISNUMBER(--MID(A2,ROW(INDIRECT("$1:$"&LEN(A2))),1))* ROW(INDIRECT("$1:$"&LEN(A2))),0), ROW(INDIRECT("$1:$"&LEN(A2))))+1,1) * 10^ROW(INDIRECT("$1:$"&LEN(A2)))/10),"")

As shown in the screenshot below, the improved formula works beautifully (kudos to Alex, our Excel guru, for this improvement):

An improved formula to extract number from anywhere in a string

Unlike in all previous examples, the result of this formula is number. To make sure of this, just notice the right-aligned values in column B and truncated leading zeros.

Credit: ablebits.com

 
Leave a comment

Posted by on May 29, 2021 in Uncategorized

 
Image

Zkteco F18 with ElectricLock+PushButton

In this diagram you can see how to install Zkteco F18 with Door lock and push button.

  • Connect NC (Yellow) of F18 to +ve (Red) on Door Lock.
  • Connect COM(Red) and +ve(Red) of F18 to +ve of the power supply (12v 3A)
  • Connect both the -ve (Black) of F18 and -ve (Black) of Door Lock to -ve of Power supply.
  • Connect BUTTON (Grey) of F18 to 1 of the connections in Push button.
  • Connect the other connection on the button to -ve of Power supply.
 
Leave a comment

Posted by on April 25, 2021 in Uncategorized

 

Disable USB mass storage access on client machines

  1. Go to the client machine and
  2. go to start button and type in to search box gpedit.msc
  3. then your group policy window will open
  4. left side of window – search Administrative Templates and double click on it
  5. then click on System
  6. next you will see Removable Storage Access just click on it
  7. then you will see lots of group policy name
  8. see the All Removable Storage Access: Deny All Access
  9. double click on it and select the option Enable and click on OK button
  10. you will success to block USB of client

Then from cmd run ==> gpupdate /force

 
Leave a comment

Posted by on January 30, 2021 in Uncategorized

 

Website hosting Name.com and iPage

In this post I will write down how to host a website at iPage and route a domain from name.com to the hosting.

  • add an A record in name.com pointing to iPage hosting server IP.
  • in iPage go to Domains ==> import domain
  • on the next screen select add existing domain. (Add your domain but keep your current registrar.)

no we if someone opens your domain, DNS will point to name.com A record. Thus traffic is forwarded to iPage hosting. Now traffic reaches the server, but we need to route the traffic to the website directory. To do this we need to add a pointer in our hosting. But by default this option is not shown on our dashboard.

All domains you added to your iPage hosting will be listed here, select the domain you want to add the pointer.

You will see these options. Select pointers.

Select Subdirectory ==> /folder_where_your_website_files_are_stored.

Now the traffic is routed to your website directory.

You need to change any domain reference in your website files. for example if you are using a wordpress template, inside wp-admin you may have assigned a domain URL, when you change the domain maping on iPage you must also change the same inside your code as well.

How do I change the WordPress Site URL?

 
Leave a comment

Posted by on January 19, 2021 in Uncategorized

 

SOTI Mobicontrol: IP address, Firewall Issues!

Upcoming changes to SOTI Services may impact our operations.

SOTI is upgrading the infrastructure which hosts SOTI Services which are leveraged by SOTI MobiControl. The upgrade will result in SOTI MobiControl accessing SOTI Services via some additional IP addresses.

What Should You Do?

FAQs

    1. What is the reason for this change?
SOTI is upgrading its hosting infrastructure for improved performance and reliability.
    2. What is the impact of the change?
As a result of this change, SOTI MobiControl’s invocation of SOTI Services may occur on some new IP addresses. Enterprise networks which are configured to strictly whitelist only certain IP addresses will block these invocations unless the actions defined above are taken.
    3. Am I impacted?
Customers using SOTI MobiControl on a network where firewalls or other network appliances are in place, which restricts access to Internet services based on IP addresses, are impacted by this change.
 
Leave a comment

Posted by on June 14, 2020 in Uncategorized

 

Understanding scientific notation of large numbers

( Disclaimer: I am saving this here for my future use as a backup. Copy pasted from onlinemath4all.com . link to the original post is ==> https://www.onlinemath4all.com/scientific-notation-rules.html )


Scientific notation is a standard way of writing very large and very small numbers so that they’re easier to both compare and use in computations.

In this section, we will learn the rules which are required to write a number in scientific notation.

Scientific Notation Rules

Every number in the scientific notation must be in the form of

a x 10n

where ≤ a < 10 and n must be a positive or negative integer.

To convert a number into scientific notation, first we have to identify where the decimal point and non zero digit come.

There are two cases in it.

Case 1 : 

To move the decimal point to the left, we have to count number of digits as explained in the example given below.

According to the example given above, we have to move the decimal point 3 digits to the left and exponent of 10 should be 3 (positive integer)

When we do so, we get the scientific notation of the given number.

Hence, 2301.8 = 2.3018 x 10³

Case 2 : 

To move the decimal point to the right, we have to count number of digits as explained in the example given below.

According to the example given above, we have to move the decimal point 5 digits to the right and exponent of 10 should be -5 (negative integer)

When we do so, we get the scientific notation of the given number.

Hence, 0.000023 = 2.3 x 10

Important Note: 

If we don’t find decimal point at anywhere of the given number, we have to assume that there is decimal point at the end of the number.

For example, 

2300000 ————-> 2300000.

Here, the non zero digit comes first and decimal point comes next. So we have to apply case 1 to convert this number into scientific notation.

Scientific Notation Rules – Examples

Example 1 :

Write the given number in scientific notation.

0.00006

Solution :

Here decimal point comes first at non zero digit comes next.

We have to move the decimal point to the right.

No. of digits from the decimal point up to the first non zero digit is 5.

So, the decimal point has to be moved 5 digits to the right and exponent of 10 should be -5 (negative integer)

Hence, the scientific notation of 0.00006 is

6 x 10-5

Example 2 :

Write the given number in scientific notation.

5400000

Solution :

Here we don’t find decimal point in 5400000. So we have to assume that there is decimal point at the end .

Then, 5400000 ———> 5400000.

Here non zero digit comes first and decimal point comes next.

We have to move the decimal point to the left.

No. of digits between the 1st non zero digit and the decimal point is 6.

So, the decimal point has to be moved 6 digits to the left and exponent of 10 should be 6 (positive integer)

5400000  =  5.400000 x 106

5400000  =  5.4 x 106

Hence, the scientific notation of 5400000 is

5.4 x 106

(Here zeros after the decimal point are not taken. Because, they are not valid zeros)

Example 3 :

Write the given number in scientific notation.

71 x 102

Solution :

Here we don’t find decimal point in 71x 102. So we have to assume that there is decimal point at the end of 71

Then,

71 x 102 ———> 71. x 102

Here non zero digit comes first and decimal point comes next.

We have to move the decimal point to the left.

No. of digits between the 1st non zero digit and the decimal point is 1.

So, the decimal point has to be moved 1 digit to the left and exponent of 10 should be 1 (positive integer)

71. x 102 = 7.1 x 101 x 102

71

Hence, the scientific notation of 71 x 102 is

7.1 x 103

Example 4 :

Write the given number in scientific notation.

33 x 10-3

Solution :

Here we don’t find decimal point in 33 x 10-3 So we have to assume that there is decimal point at the end of 33

Then,

33 x 10-3 ———> 33. x 10-3 

Here non zero digit comes first and decimal point comes next.

We have to move the decimal point to the left.

No. of digits between the 1st non zero digit and the decimal point is 1.

So, the decimal point has to be moved 1 digit to the left and exponent of 10 should be 1 (positive integer)

33. x 10-3  = 3.3 x 101 x 10-3

33. x 10-3  = 3.3 x 10-2

Hence, the scientific notation of 33 x 10-3 is

3.3 x 10-2

Example 5 :

Write the given number in scientific notation.

0.63 x 10-3

Solution : 

Here decimal point comes first and non zero digit comes next.

We have to move the decimal point to the right.

No. of digits from the decimal point up to the first non zero digit is 1.

So, the decimal point has to be moved 1 digit to the right and exponent of 10 should be -1 (negative integer)

0.63 x 10-3  =  6.3 x 10-1 x 10-3

0.63 x 10-3  =  6.3 x 10-4

Hence, the scientific notation of 0.63 x 10-3 is

6.3 x 10-4

 
Leave a comment

Posted by on November 19, 2019 in Uncategorized

 

Tags:

How to download a torrent

Things to know before we begin

  •  There’s no central server involved; data is downloaded from other users (seeders).
  •  you need a client application to download torrents.

Process is like this

Install client application ==> Search for the file ==> get the “.torrent” file ==> open it in client application ==> start download
There are tons of applications available on internet any of them would do. But I recommend using one of the following.

  1. deluge
  2. utorrent
  3. bittorrent
  4. Qbittorrent
  5. vuze
  6. BitComet
  7. Transmission

Now open a torrent search engine. Just like google but for searching torrents
(search google there is lot of them)

(Beware that most of the torrents nowadays are illegal. Use a VPN for protecting privacy when downloading torrents from internet.)

The speed at which you can download a torrent file is determined by the number of seeders available.

A seeder is a torrent user that has the entire file available for downloading. The number of leechers will affect your download speed as well. A leecher is a user that is downloading, but is not currently seeding. A leecher becomes a seeder when the full file has been downloaded. If there are significantly more leechers than seeders, the amount of bandwidth you receive will be lower, resulting in slower downloads.
Download torrents with a large number of seeders and of the best quality and size.
After downloading the .torrent file you need to open the file in any of the torrent client you have installed. The download will begin.
Alternatively you can use magnet links. In torrent sites you will see an option called magnet links. when clicked they will open your default torrent client and start the download. no need to download a .torrent file.
Some sites will give you a hash value for the torrent. you can use this value to download a torrent. in your client, go to file >> add a torrent from link. then paste the hash value.
the download will begin when you press enter.
 
Leave a comment

Posted by on April 1, 2019 in Uncategorized