[scripting] Get AD Subnet Name from IP Address

2017-09-18 Thread Sean Martin
Looking to use PowerShell to query ADSS and retrieve the applicable Subnet Name when provided an IP address. I've been playing around with NLTest /DSAddressToSite, which provides the applicable subnet, but I was curious if there's any easier way before I start digging into parsing the response from

Re: [scripting] RE: bat file will only run one time

2017-09-12 Thread Sean Martin
Next step is changing your admin password. - Sean > On Sep 12, 2017, at 12:39 PM, David Landry wrote: > > Thank you to all for all the guidance. It is very much appreciated. > > > From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] > On Behalf Of Benke, Richard L.

[scripting] Import Photos in AD directly from SQL Blob DB

2017-05-25 Thread Sean Martin
Hello, I've been asked if we can script the import of photos into AD directly from a SQL Blob DB rather than extracting them all to a file repository. I've gotten a bit better with Powershell but haven't done too much interaction with SQL. Has anyone put together something similar and wouldn't mi

Re: [scripting] looking for powershell script for registry modification

2016-09-07 Thread Sean Martin
Not able to test, but hopefully this points you in the right direction: $key = "HKLM\System\Test" $Name = (Get-ItemProperty -Path $key -Name hai).hai $Valuename = "hai" $Value = "8" If (Test-Path $key) { Write-Host "Registry Path $key exists" If (!($Name) { New-ItemProperty -path $key -name $