Monday, February 1, 2016

Powershell Script

We have a lot of new users coming and going .Some volunteers and temporary workers as well. It got a little cumbersome to relay information to their supervisors after creating accounts and doing a whole new user orientation. So... I wrote this pretty simple powershell script to take some arguments from me and email the relevant people. The users's supervisor is their first point of contact and will give them the information. They will also find the same information in their mailbox when they get logged in (with their supervisor). I then attached a "virtual" orientation for them to use and a welcome letter with useful info. It has cut down my meeting time with them as well as subsequent calls  quite a bit.

$NewUser = Read-Host -Prompt 'New Username'
$NewUserPassword = Read-Host -Prompt 'Temporary Password'
$NewUserEmail = Read-Host -Prompt 'New User Email Address'
$Extension = Read-Host -Prompt 'New User Extension'
$VoicemailPin = Read-Host -Prompt 'New User VM Pin'
$SupervisorEmail = Read-Host -Prompt 'Supervisor Email Address'
$Date = Get-Date
#introduction part of the email which changes based on above inputs.
$intro = "New Username: $NewUser | Temporary Password: $NewUserPassword | Extension: $Extension | Voicemail Pin: $VoicemailPin"
$QSGuide = "<LINK TO THE GUIDE IN HTML FORMAT>"
$recipients = $NewUserEmail,$SupervisorEmail
Write-Host "$NewUser $NewUserPassword $NewUserEmail $Extension $VoicemailPin $SupervisorEmail"
#take a moment to make sure the stuff is right.

."C:\scripts\PauseFunction.ps1"
pause
#email that stuff out
foreach ($recipient in $recipients)
{

    $smtpserver = "< YOUR EMAIL SERVER>"
    $from="<YOUR EMAIL ADDRESS>"
    $to= $recipient
    $bcc = "<IF DESIRED>"
    $subject="New User Quick Start Guide"
    $body = $intro + $(Get-Content $QSGuide|Out-String)
    $mailer = new-object Net.Mail.SMTPclient($smtpserver)
    $msg = new-object Net.Mail.MailMessage($from,$to,$subject,$body)
    $msg.IsBodyHTML = $true
    $mailer.send($msg)
}
Remove-Item function:\Pause


Here is the pause function:
Function Pause($M="Press any key to continue . . . "){If($psISE){$S=New-Object -ComObject "WScript.Shell";$B=$S.Popup("Continuing will send an automated email.",0,"Script Paused",0);Return};Write-Host -NoNewline $M;$I=16,17,18,20,91,92,93,144,145,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183;While($K.VirtualKeyCode -Eq $Null -Or $I -Contains $K.VirtualKeyCode){$K=$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")};Write-Host}

Tuesday, November 10, 2015

Women in Information Technology

Illustrious husband and I were discussing the upcoming Red Chair Pittsburgh event which is part of the larger Sit With Me movement.

I generally shy away from speaking publicly on these kinds of things because I think movements like these tend to overgeneralize the issues at hand. So many different life circumstances for people mean there are an infinite number of variables contributing to what we are marking as a problem (too few women in IT). That being said, I think it's important that people understand what roadblocks exist for people of every race, creed, gender and ilk on the path to job satisfaction. To that end, I hope people will think about how the tech industry has become insular and homogenous, the type of culture that exists that has become exclusive, and the steps we can take to make it more inclusive.

Check it out if you have some free time on the 19th.




Windows 8.1 100% Disk Utilization

I've been battling this issue on and off (sometimes it just wasn't worth it) for months now. Ever since I upgraded from windows 8 to 8.1. This is my work computer and it's mostly just a management workstation so I didn't spend a whole lot of time looking into it at first. Today I finally decided something had to be done. It was taking WAYyyyyyyyyyy too long to get things done. Even responding to an email or opening a web page was getting cumbersome.
I looked at all the usual suspects:
-Antivirus
-Runaway processes
-Did a malware scan
-Disabled superfect
-Changed windows search so it was looking at basically nothing
 and a few other registry edits found on random boards.
What really did it for me was watching the resource monitor and noticing that it was reading heaps from \Windows\SoftwareDistribution\Download. So - I decided to delete the folder. Low and behold - disk utilization dropped to nil.
 I'm happily now running at 1% disk usage.

Hope this helps someone out there.

Monday, July 27, 2015

iPhone 5s Causes Random Drops on Avaya digital phone

For two weeks, whenever I was on the phone with my counterpart (AVAYA PBX, digital), I would hear a sharp sustained beep and our call would drop.


Turns out - the "Note" tone on the iPhone 5s matches some weird frequency that results in a disconnected phone call when the iPhone is placed near the desk phone. In this case, his phone was set to the "Note" notification for text messages.



Friday, August 1, 2014

Windows 8.1 and 100% Disk Usage

Directly after I updated to Windows 8.1, my Lenovo AIO started slowing to a crawl. It would fluctuate between 60% and 100% disk usage, even when I wasn't doing anything.

Searching was painful, opening apps was painful and you could tell when it was running at 100%.

Solution:

I read online a few different people having issues with the Skype App - since I don't use it, I simply uninstalled it. They reported that if you simply open it, the issue dissipates.

Other suggestions were:
Disable windows search - I tried that but it did not help, plus I use it...alot.

What finally did it?
Disable and remove all the apps that are pinned to your start menu that contain "live" data (the live tiles). I actually went ahead and uninstalled them, since I don't spend much time on the start screen anyway and if I'm there, it's not to read live tiles, it's to open an app.


So far, it's been running between 3 and 8 %.


Fingers crossed, I really didn't want to have to reimage my entire computer.

Update: 11/10/2015 - It didn't work. See post here for resolution.


Thursday, July 31, 2014

Site to Site VPN with Cisco ASA and Sonicwall NSA Series

Set up three site to site VPN tunnels recently for a project.  One was a Cisco ASA and the other a Sonicwall NSA series.

We ran into two issues:
Problem 1: While setting up the tunnel with the ASA, we couldn't get the second IKE phase to agree. We were seeing an error that looked something like "destination host does not match remote host" or some business.

Problem 2: Users at the main site (Site A) couldn't connect to the other two sites (Site B, Site C) when connecting over Sonicwall Global VPN Client.

Our Solutions:
Problem 1:
Cisco and Sonicwall notate subnets differently.  If you have a LAN range defined in the Sonicwall but something like 172.16.0.1/21 notated in the Cisco, they will not translate.
The solution is to create a network in the Sonicwall with the matching netmask (172.16.0.1 with the netmask of 255.255.248.0 or applicable netmask).
They will then agree.

Problem 2:
Even if you were able to connect before to the other sites, but after setting up the tunnel you can no longer, there is an easy fix to this which I found all over the internet unasnwered, but logging into Sonicwall's site - you get the following KB article:
https://www.fuzeqna.com/sonicwallkb/ext/kbdetail.aspx?kbid=7122&p=t


Add the site to site remote network to the GVC user's VPN access list in the UTM web management GUI.  Or, you can do this for an entire local users group and users will inherit this VPN access permission when they connect with GVC the next time.  Please follow the procedure as below:

1) Log into the firewall web management GUI, go to the Users > Local Users screen.



2) Click the configure button of the GVC user or user Group that you want to modify


3) Navigate to VPN Access tab inside the Edit window for the user.


4) Select the Remote VPN network and move it to right.


5) Click OK to complete.


 6) Now when GVC user connects to WAN GroupVPN on the SonicOS Enhanced UTM appliance, they will have access to networks at two locations. 



There is one additional step - on the ASA you need to make sure that the VPN subnet has access in NAT0.

Monday, July 7, 2014

Sharepoint 2010 All Day Events are 12 hours off

Sharepoint 2010 doesn't adjust for timezones, so all day events usually show on the wrong day. This is because of the UTC time and Sharepoint.  The short answer is - sort by "end time" instead of writing lots of code - it's not a perfect solution but it's better.