Posts

Showing posts from February, 2018

How to create a Virtual Machine in Microsoft Azure - ARM

Image
How to create a Virtual Machine in Azure - ARM  Azure virtual machines can be created through the Azure portal. This method provides a browser-based user interface for creating and configuring virtual machines and all related resources.  Login to your Azure Portal: https://portal.azure.com/ If you don't have an account sign up here for  Free Let's Create a Virtual Machine: Click on Virtual machines from the Hub menu(left side on the portal). If you don't see this option please click on All Services and search Virtual machines. Click on Add option as shown below Select the OS flavor from the blade menu, in this case, we have selected Windows machine. Select the flavor/version of Windows machine. Here we have selected 2016 Datacenter. Then click on Create option. This will take you to the configuration of the machine window. Below is the Basic configuration required for setting up this virtual machine. Once done please click on ...

iPhone/iPad Can’t Update to iOS 11? Here’s How to Fix

Image
iOS 11 is available for downloading at present. It is not surprising that various Apple users have been rushing to update and install the latest major upgrade. However, some iPhone 7 or iPhone 6s/6 users can’t find the update via Settings > General > Software Update. Some other users will get update failure or unable to install update error. Given this, we have gathered some of the cases and solutions about how to fix iPhone won’t update to iOS 11. Case 1. What Devices Can Update to iOS 11? "After the last night presentation I' d like to know if there will be compatibility of iOS 11 with iPhone 5c." How-To Fix : If your machine won’t update to iOS 11, confirm that whether it is compatible with iOS 11 at first. You need to recognize that not all iOS devices are able to update to iOS 11. Therefore, before complaining about failing to update iOS 11, check if your Apple device supports the update. Here is a full list of iOS 11 device compatibility. ...

How to write a Formatted Email using Powershell / Automation

How to write a Formatted Email using Powershell / Automation #Author : Nishant Naidu #Technet - i-TechNinja Hey Bros, This script will help you to write a formatted email using Powershell :) With the help of this script, you can send mail with customize date. You can also have a formatted custom body, html, table, cells and all. You can automate or schedule this to run occasionally. When you are sending static mails every time across number of users, you can simply use this script to do your job. Let the script do its job and you sit back and relax :enjoy your day :) ThisScript : #  Hi, This script will help you to format mail # You can use this to automate/schedule mail # You can also convert this ps1 to exe and schedule it # I hope it helps :) #If you want to sent attachment in mail pls mention filename path below $dir = "c:\crazycerebro\yourfilename.here" #If you to add dynamic date so that whenever you schedule it should take that particular ...

Check Uptime for Multiple Servers using Powershell - GUI based tool

Image
Check Uptime for Multiple Servers using Powershell - GUI based tool #Author : Nishant Naidu #Technet - i-TechNinja # https://social.technet.microsoft.com/profile/i-tech%20ninja/ #azurebros.blogspot.in This tool will help you to determine the uptime for the multiple servers. Script : Function Get-Uptime{ Param([string]$server) Begin { function PingServer { Param([string]$srv) $pingresult = Get-WmiObject win32_pingstatus -f "address=’$srv’" if($pingresult.statuscode -eq 0) {$true} else {$false} } function myUptime { param([string]$srv) $os = Get-WmiObject Win32_OperatingSystem -ComputerName $srv $uptime = $os.LastBootUpTime return $uptime } function ConvertDate { param([string]$date,[string]$srv) $year = $date.substring(0,4) $Month = $date.Substring(4,2) $day = $date.Substring(6,2) $hour = $date.Substring(8,2) $min = $date.Substring(10,2) $sec = $date.Substring(12,2) $RebootTime = new-Object System.DateTime($year,$month,$day,$hour,$min,$sec) $now = [System.D...

Robust Copy large files over the network - using ROBOCOPY

Robust Copy large files over the network - using ROBOCOPY Robust File and Folder Copy. By default Robocopy will only copy a file if the source and destination have different time stamps or different file sizes. Syntax  robocopy source destination [file [file]...] [options] file(s)_to_copy : A list of files or a wildcard . (defaults to copying *.*) Source Options: /S : Copy Subfolders. /E : Copy Subfolders, including Empty Subfolders. /COPY: copyflag [ s ] : What to COPY (default is /COPY:DAT) (copyflags : D =Data, A =Attributes, T =Timestamps S =Security=NTFS ACLs, O =Owner info, U =aUditing info). /SEC : Copy files with SECurity (equivalent to /COPY:DATS). /DCOPY:T : Copy Directory Timestamps. /COPYALL : Copy ALL file info (equivalent to /COPY:DATSOU). /NOCOPY : Copy NO file info (useful with /PURGE). /A : Copy only...

Get Account Expiry Date for the list of users - Powershell

Get Account Expiry Date for the list of users - Powershell  The standard approach lets you to get the account expiry details for the entire ADuser and its also time consuming. Since it has to return the all the users with their expiry details. Querying such a large database takes lot of time. Below script will allow you to narrow down your search query. Script: #import AD module Import-Module   ActiveDirectory ; #save the list of users in text file at any given location, mention that path below $userlist   =   Get-Content   "C:\folder\listofuser.txt" ; # $output variable will save the result in it $Output   =   foreach ( $user   in   $userlist ) { #Querying each user and returning their respective details by using Select Get-ADUser   -property   *   -ldapfilter   "(samaccountname= $user )" |   select   sAMAccountName ,   Displayname , accountExpirationDate ,   ...

Check Server Info - Powershell

Image
Check Server Info - Powershell Check various System/Network properties using below Powershell Script: Script: Check Services - ServiceInfo using Powershell $path = "$([Environment]::GetFolderPath("Desktop"))\Services Info.txt"; Get-WmiObject -Class Win32_Service -ComputerName . | Out-File $path -Encoding UTF8 -Append -Width 1000 notepad $path; ------------------------------------------------------------------------------------------------------------------------- Check Updates installed - Installed Hotfixes Info using Powershell $path = "$([Environment]::GetFolderPath("Desktop"))\Installed Hotfixes Info.txt"; Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName . | Out-File $path -Encoding UTF8 -Append -Width 1000 notepad $path; ---------------------------------------------------------------------------------------------------------------------- Check Processor - Processor Info Using Powershell ...

Check if Reboot is Required on multiple server - using Powershell GUI based tool

Image
Check if Reboot is Required on multiple server - using Powershell GUI based tool This is a powershell script that will help you to find if a reboot is required on a server or a multiple server. Note:  This script will not reboot any of the server. It will just give you true/false value if the reboot is pending or not. Lets Start: Whenever you check for updates, after updating the patches it generates registry RebootRequired. This information is stored at HKeyLocalMachine of the registry. Below are several paths where you can find it -- To open registry --> press windows+R then type regedit hit enter.. "HKLM\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\" "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired "  Script 1: function Test-PendingReboot { if (Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentV...

How to monitor Exchange Queues?

How to monitor Exchange Queues / How to setup an Alert for Exchange Queues... #Author : Nishant Naidu #Technet - i-TechNinja # https://social.technet.microsoft.com/profile/i-tech%20ninja/ #https://itechninja.blogspot.in/ # https:// crazycerebro.blogspot.in #https://social.technet.microsoft.com/wiki/contents/articles/47620.how-to-monitor-exchange-queues-how-to-setup-an-alert-for-exchange-queues.aspx #load Snapin Add-PSSnapin Microsoft.Exchange.Management. PowerShell.SnapIn; #Set Mailing parameters $sendMailMessageParams = @{ Smtpserver = " smtp server " To = " To? " From = " From? " } # HTML Body  $head = "<style>",         "BODY { background-color: white; }",         "TABLE { border-width: 1px; border-style: solid; border-color: black; border-collapse: collapse; }",         "TH { border-width: 1px; paddin...