Windows Server 2012 R2 powershell script to generate report for installed Hotfix-Update for Bulk Servers

=============================================================== function Hotfixreport { $computers = Get-Content C:\serversHF.txt $ErrorActionPreference = ‘Stop’ ForEach ($computer in $computers) { try { Get-HotFix -cn $computer | Select-Object PSComputerName,HotFixID,Description,InstalledBy,InstalledOn | FT -AutoSize } catch { Write-Warning “System Not reachable:$computer” } } } Hotfixreport > “$env:USERPROFILE\Desktop\Hotfixreport.csv” Read More …

Powershell login Script for Office 365

Copy the following content to a notepad and save as .PS1 Start-Service WinRM Set-ExecutionPolicy RemoteSigned Import-Module MSOnline $O365Cred = Get-Credential $O365Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection Import-PSSession $O365Session Connect-MsolService –Credential $O365Cred Open the powershell as Read More …