Portfolio

/Amir Vincent Zaman/>_

avzaman2020@outlook.com
Somerville, NJ
B.S. Computer Science

!!!?First blog?!? With POWERSHELL snippet!

I spent the last 4-6 years studying to be a developer/database/coding guy and without having landed any internships there is a serious lack of industrial satisfaction. By that I mean none meaningful real-world results of my code that affect anyone or anything. Plus my first job out of CS has me working IT sytems admin in a Windows environment. Kind of a 90 degree turn from my studies. I'm sure many of the huge flood of CS graduates may find themselves in a similar situation (I avoid to say similar "pickle" or "perdicament" because it is actually quite a nice deal).

However (comma) I've actually seen my coding knowledge to be a large asset in automation of IT tasks. Specifically I have had to take a comprehensive inventory of all our workstations connected to the network acroos different sites, but traveling around writing down details in a notebook about system settings is just too darn time cumbersome!! Not knowing any powershell but having a grasp on basic networking I set out to learn and discovered much wmi objects and the querying system modern Windows OS provides. Exporting a list from either a management agent installed on all devices, or even better Active Directory itself, can procide a csv which to loop over and grab specifics for all relevant devices. I needed to get stuff like: is uefi enable so we can enable secure boot, is it TPM capable so we can upgrade to windows 11, what's the model of the pc.

Sample Usefull "For" Loop

Look at this we have command line parameters being checked, we have connections being checked, we're reading files, we're writing files. Feelsgoodman. Workflow is kinda garbage cuz this generates csv which I copy the columns into a specific page of the master inventory xml and then there's a vlookup in the main table to reference this crap and join on hostname. But it beats going to each lad and interrupting people to use their computers.

# takes in a csv of host names
# checks the system info for a "System Model"
# appends hostname and system model to different csv file models.csv
Param([Parameter(Mandatory, HelpMessage = "Provide a valid path")][string]$Hosts)
$out = ".\Models.csv"
New-Item -Path $out -Force #create the csv file to appened to
        

$HostList = Import-Csv -Path $Hosts -Header HostName

foreach ($line in $HostList) {
    $hname = $line.HostName
    if (Test-Connection -ComputerName $hname -Count 1 -Quiet) {
        try {
            Write-Host "Connecting to $hname"
            $info = psexec \\$hname powershell -command "wmic computersystem get manufacturer,model"
            $info = $info[7]
            $outstr = $hname + ",$info"
            Write-Host $outstr
            Add-Content -Path $out -Value $outstr
            # Out-File
        }
        catch {
            Write-Error "Error occured $($_.Exception.Message)"
        }
    }
    else {
        Write-Host "$hname is not reachable!"
    }
}

Bye Bye!

In a large enterprise that's been in the same area for decades hardware can get lost track of. Computer Science has a place in remedying issues like this, and it provides valuable experience to work in IT even if the end goal is to develop software full time. I don't know where my career will take me (nor do most people probably), but this is a pretty riveting start. God there needs to be a better html formatter.

See ya in 2 weeks ~Vince 4-19-2025