Microsoft

PowerShell Script using Webclient to download files from URL with basic authentication

The below PowerShell script will use WebClient to download files from a URL that is requesting basic authentication. #!powershell # Setup Key Values ################################### $URL="http://yourserver//filetodownload.exe" $DOWNLOADTARGETPATH= "C:\filetodownload.exe" $USER_TO_ACCESS_DOWNLOAD = "YourUserName" $USER_PW = "YourUserPassword" # Force TLS 1.2 ################################### [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Download the file with authentication using webclient [...]

2024-09-04T15:18:26-04:00September 4th, 2024|Microsoft, Powershell Scripts|Comments Off on PowerShell Script using Webclient to download files from URL with basic authentication

PowerShell Script using Invoke-WebRequest to download files from URL with basic authentication

The below PowerShell script will use Invoke-WebRequest to download files from a URL that is requesting basic authentication. #!powershell # Setup Key Values ################################### $URL="http://yourserver//filetodownload.exe" $DOWNLOADTARGETPATH= "C:\filetodownload.exe" $USER_TO_ACCESS_DOWNLOAD = "YourUserName" $USER_PW = "YourUserPassword" # Forece TLS 1.2 ################################### [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Download the file with authentication using Invoke-WebRequest [...]

2024-06-12T19:29:19-04:00June 12th, 2024|Microsoft, Powershell Scripts|Comments Off on PowerShell Script using Invoke-WebRequest to download files from URL with basic authentication

PowerShell Script to change the password of the local administrator account

The below PowerShell script will Allow you to change the password of the local administrator account. #!powershell # Setup Key Values ################################### $newpassword = "YourNewPassword" $ErrorActionPreference = "Stop" $hostname = "$env:computername" # Create computer object $computer = [ADSI]("WinNT://$hostname,computer") # Get local users list $userList = $computer.psbase.Children | Where-Object { $_.psbase.schemaclassname -eq 'user' [...]

2024-06-12T19:27:33-04:00June 7th, 2024|Microsoft, Powershell Scripts|Comments Off on PowerShell Script to change the password of the local administrator account

Voicemail messages aren’t delivered in Teams but received in outlook

If you have a problem with your teams not delivered in teams but you still receive the email notification it might be a problem with your Exchange delivery. First part to investigate is testing the Teams Voice mail issue using the following link https://testconnectivity.microsoft.com/tests/TeamsVoicemail/input Based on the test, you can fix the issue, [...]

2024-01-23T19:54:51-05:00January 23rd, 2024|Microsoft|Comments Off on Voicemail messages aren’t delivered in Teams but received in outlook

PowerShell Script to download and unzip files

The below PowerShell script will demonstrate how to download and unzip files to specific directory. #!powershell # Setup Key Values ################################### $URL="http://yourserver//yourzipfilename.zip" $downloadtargetpath= "C:\temp\yourzipfilename.zip" $unziptargetpath= "C:\temp" # Forece TLS 1.2 ################################### [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Download the script to C:\temp Directory ########################################### write-host " " write-host "Download the zip [...]

2023-04-25T02:04:23-04:00April 25th, 2023|Microsoft, Powershell Scripts|Comments Off on PowerShell Script to download and unzip files

PowerShell Script to Add IP to Local Host File

The below PowerShell script will Add any IP you like to the Local Windows Host File for name resolving . #!powershell # Setup Key Values ################################### $ServerName = "ad01.knowledgeascent.com' $IPofServerName = "10.100.200.50" $file = "C:\Windows\System32\drivers\etc\hosts" $hostname = $env:computername # Adding the IP to Local Host File ##################################### function add-host([string]$filename, [string]$ip, [string]$hostname) { [...]

2022-06-09T12:40:30-04:00June 9th, 2022|Microsoft, Powershell Scripts|Comments Off on PowerShell Script to Add IP to Local Host File

PowerShell Script to install and configure SNMP

The below PowerShell script will check if SNMP is installed, if it is not installed it will install the service and configure it. #!powershell # Setup Key Values ################################### ## Security Tab $managers = @("localhost","mgt1.knowledgeascent.com") $ReadOnlyCommunities = @("public") $ReadWriteCommunities = @("publicrw") ## Agent Tab $sysContact = "[email protected]" $sysLocation = "KA Data Center" [...]

2021-11-26T01:59:28-05:00November 26th, 2021|Microsoft, Powershell Scripts|Comments Off on PowerShell Script to install and configure SNMP

Getting error “The specified account does not exist” when using Meraki VPN or VPN account different than domain account.

When connecting using the VPN on Windows 7, Windows will try to authenticate with the VPN credentials instead of the Domain credentials.This will give you an error “The specified account does not exist” when trying to access domain resources like file shares. To solve this problem you should disable using RAS credentials on the [...]

2023-04-25T01:59:55-04:00June 25th, 2018|Microsoft|Comments Off on Getting error “The specified account does not exist” when using Meraki VPN or VPN account different than domain account.

PowerShell Script to rename local Guest account

The below PowerShell script will demonstrate how to rename local guest account. #!powershell# Setup Key Values###################################$computername = "$env:computername"# Rename Local Guest Account  ###################################$ErrorActionPreference = "Stop"# Create computer object$computer = [ADSI]("WinNT://$computerName,computer")# Get local users list$userList = $computer.psbase.Children | Where-Object { $_.psbase.schemaclassname -eq 'user' }foreach ($user in $userList)  {   # Create a user object in order to [...]

2018-05-04T01:16:51-04:00May 4th, 2018|Microsoft, Powershell Scripts|Comments Off on PowerShell Script to rename local Guest account

PowerShell Script to rename local Administrator account

The below PowerShell script will demonstrate how to rename local administrator account. #!powershell# Setup Key Values###################################$computername = "$env:computername" # Rename Local Administrator Account  ###################################$ErrorActionPreference = "Stop"# Create computer object$computer = [ADSI]("WinNT://$computerName,computer")# Get local users list$userList = $computer.psbase.Children | Where-Object { $_.psbase.schemaclassname -eq 'user' }foreach ($user in $userList)  {   # Create a user object in order to [...]

2018-05-04T01:15:48-04:00May 4th, 2018|Microsoft, Powershell Scripts|Comments Off on PowerShell Script to rename local Administrator account

About me

I have more than 15 years hands-on experience in the IT field. The majority of my work is in networking, operating systems and applications and storage. I carry industry certifications in Redhat, Microsoft, EMC, VMWare, VCE and ITIL.

I find it hard to find procedures or documents on how to implement specific technology and this is how the decision to create a place to share my knowledge and ideas for anyone interested in the same subject.

If you have the same vision and you are interested to publish on this website please contact me and I will create an account for you.

Certifications:
RHCSA

Certifications:
MCSE Security
MCSA Massaging

Certifications:
EMCIE- Isilon
EMCTA- Isilon
EMCIE- VNX

Certifications:
VCP-DCV

Certifications:
VCE-CIA

Certifications:
TITL

This site is targeting Solution Architects, Implementation Engineers and Systems Administrators. It is not targeting sales or intending to promote any specific technology or vendor.

The focus is on hands-on work, technical documentations and architecting solutions.

The site reflects my knowledge and opinions, I do recommend that you test what you learn in the lab environment before implementing it in production.

If you have a doubt call technical support, I do not assume any liability for any errors or omissions in those articles, I also make no representations as to the accuracy or completeness of any information on this site or found by following any link on this site

Content published here is tested in my own lab and is not reviewed or approved by any vendor.

If you have any issues with your system I highly recommend you contact the technical support of the vendor.

Disclaimer

Knowledge Ascent (KA) makes information available on its web site to enhance public knowledge and promote a better understanding of the IT environment. KA attempts to provide accurate, complete, and timely information. KA, however, cannot guarantee the quality, content, accuracy, or completeness of the information, text, graphics, links, and other items contained on its web pages because the material comes from a variety of sources, collected and maintained for different purposes. KA also retains the right to change any content on its web site without prior notice.

Information provided on the KA web site should not be used as a substitute for IT or other professional advice. KA assumes no liability for any damages or loss of any kind that might arise from the use of, misuse of, or the inability to use the KA web site and/or the materials contained on the web site. KA also assumes no liability for improper or incorrect use of materials or information contained on its web site. All materials that appear on the KA web site are distributed and transmitted "as is," without warranties of any kind, either express or implied, and subject to the terms and conditions stated in this disclaimer.

Go to Top