Posts
Using Proxy to Install-Module
- Get link
- X
- Other Apps
Find-Module -Name PowerShellGet # To look for a module Find-Module -Name PowerShellGet | Install-Module # To look for a module and install that Using Proxy to connect to Internet: Import the proxy settings from Internet Explorer parameters: netsh winhttp import proxy source=ie or set them manually: netsh winhttp set proxy "192.168.0.14:80" To view current proxy setting: netsh winhttp show proxy To reset the winhttp proxy : netsh winhttp reset proxy If you are signed in using your domain account and your proxy supports NTLM/AD authentication, you can use the credentials of the current user to authenticate on the proxy server (you won’t have to enter your username/password): $Wcl = new-object System.Net.WebClient $Wcl.Headers.Add(“user-agent”, “PowerShell Script”) $Wcl.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials If you have to authenticate on the proxy server manually, run the following commands and specify use...
Get Powershell Foreground colors
- Get link
- X
- Other Apps
Below Powershell command lists all foreground colors available: [Enum]::GetValues([System.ConsoleColor]) Example: PS C:\> [Enum]::GetValues([System.ConsoleColor])Black DarkBlue DarkGreen DarkCyan DarkRed DarkMagenta DarkYellow Gray DarkGray Blue Green Cyan Red Magenta Yello Ref : https://stackoverflow.com/questions/20541456/list-of-all-colors-available-for-powershell Get the colours displayed in screen with below script: $colors = [ enum ]:: GetValues ([ System . ConsoleColor ]) Foreach ( $bgcolor in $colors ){ Foreach ( $fgcolor in $colors ) { Write - Host "$fgcolor|" - ForegroundColor $fgcolor - BackgroundColor $bgcolor - NoNewLine } Write - Host " on $bgcolor" }
Solution for RDP connection issue due to TLS version
- Get link
- X
- Other Apps
Issue : RDP connection is unsuccessful from Windows 7 or Windows 2008 R2 to TLS1.0 disabled servers. Solution : Enable TLS1.2 in the server and reboot. Refer this link for TLS versions: TLS versions Install this hotfix from Microsoft in the client computers and reboot: https://support.microsoft.com/en-sg/help/3080079/update-to-add-rds-support-for-tls-1-1-and-tls-1-2-in-windows-7-or-wind This update provides support for Transport Layer Security (TLS) 1.1 and TLS 1.2 in Windows 7 Service Pack 1 (SP1) or Windows Server 2008 R2 SP1 for Remote Desktop Services (RDS).
Solutions for WMI errors
- Get link
- X
- Other Apps
Solutions for WMI errors Symptoms: When you run wmic commands in a Windows server, you may get errors like below: wmic VOLUME GET Name ERROR: Description = Not Found Below are solutions for WMI errors, yet to be verified: If WMI database is broken, you need to follow this guide: https://msdn.microsoft.com/en-us/library/aa394603(v=vs.85).aspx to run WMI Diagnosis Utility , which will help you to confirm if that is really your issue and then fix it by following this guide: First try: winmgmt /verifyrepository .If the result is shown as inconsistent, go to step 2 winmgmt /salvagerepository winmgmt /verifyrepository - to check again wmi repository had been repaired successfully. If it fails - try fully rebuild the WMI Repository follow these steps: Disable and stop the winmgmt service Remove or rename C:\Windows\System32\wbem\repository Enable and start the winmgmt service Open a CMD prompt as Administrator In the CMD prompt Navigate to C:\Windows\System32\...
Windows Servers EOL dates
- Get link
- X
- Other Apps
Windows Servers EOL dates Windows Servers: OS Lifecycle Start Date Mainstream Support End Date Extended Support End Date Windows Server 2008 Service Pack 2 29/4/2009 13/1/2015 14/1/2020 Windows Server 2012 Standard 30/10/2012 9/10/2018 10/10/2023 Windows Server 2016 Standard 15/10/2016 11/1/2022 12/1/2027 Windows Server 2019 Standard 13/11/2018 9/1/2024 9/1/2029 Ref: https://support.microsoft.com/en-my/lifecycle/search/1163 SQL Servers: OS Lifecycle Start Date Mainstream Support End Date Extended Support End Date Icrosoft SQL Server 2008 Service Pack 4 7/7/2014 8/7/2014 9/7/2019 SQL Server 2012 Service Pack 4 11/7/2017 12/7/2022 SQL Server 2016 Service Pack 2 24/4/2018 13/7/2021 14/7/2026 SQL Server 2017 on Windows (all editions) 29/9/2017 11/1...