• Powershell on Startup + Azure Storage

    8
    1 Votes
    8 Posts
    723 Views
    JaredBuschJ

    @joel said in Powershell on Startup + Azure Storage:

    I tried this. Powershell launched at startup but the script didnt run. What I noticed is that if i run the script with powershell, it doesnt work. However if I open with Powershell and execute the script, it works!

    You cannot map a dive a startup, that requires a user session.

  • 2 Votes
    20 Posts
    4k Views
    scottalanmillerS

    @jaredbusch said in SIP Desk Phones Not Re-Registering with Main WAN's IP After WAN Fail-back:

    @scottalanmiller said in SIP Desk Phones Not Re-Registering with Main WAN's IP After WAN Fail-back:

    @taurex said in SIP Desk Phones Not Re-Registering with Main WAN's IP After WAN Fail-back:

    @jaredbusch Thanks for this link. I'll give it a try. I hope UBNT did not trim the CLI down too much on the USG. I now better understand why Edge series is still the prefered choice for deployment among many๐Ÿ™‚

    Especially now that UNMS is available, that's pretty slick.

    UNMS 0.12.0 (currenlty in alpha) will add the CLI to the web interface.

    That's very exciting. So much good stuff happening with UNMS.

  • 0 Votes
    15 Posts
    2k Views
    anthonyhA

    Another revision.

    Added logic for when "lastlogontimestamp" does not exist. This indicates the account has never logged in. So now if "lastlogontimestamp" doesn't exist it checks the account's creation date and disables the account if the creation date is past the expiration threshold.

    Also added basic email reporting.

    param ( [string]$group, [string]$days = 30, [string]$test = "y" ) # This script will search AD for eligible accounts to disable if they have either # 1) never logged in and are older than the expration, or 2) if the last login is older than the expiration. $emailAddrTo = "[email protected]" $emailAddrFrom = "[email protected]" $emailSMTP = "mail.domain.org" $logStart = get-date -format g $hostName = $env:COMPUTERNAME $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name $log = "$scriptPath\$scriptName.log" $delimitedList = "$scriptPath\$scriptName.delimited.txt" # If the group parameter is not specified, throw an error and short script usage example. if ( -not ($group)) { echo "Group parameter missing." echo "Script usage: $scriptName -group `'AD Group`' -days 30 -test NO" echo "If `"-days`" isn't specified the default is 30." echo "If `"-test NO`" isn't specified, no changes will be made." exit } echo "Disabling accounts in group $group that have no logged in for more than $days day(s)." if ( $test -ne "NO") { echo "Running in **TEST** mode. No changes will be made!" } import-module activedirectory # Select AD accounts based on group parameter if ( $group -eq "All") { echo "Group All specified, grabbing all Active Directory users" $disableList = @(get-aduser -filter * | select -expandproperty SamAccountName) } else { echo "Grabbing Active Directory users that are a member of $group" $disableList = @(get-adgroupmember $group | select -expandproperty SamAccountName) } # Set expiration threshold based on days parameter $expiration = (get-date).adddays(-$days) # Define arrays to log eligible accounts $noLogons = @() $expiredLogons = @() # Loop through accounts foreach ($acct in $disableList) { # Reset $lastLogonTS to accomodate for null results. $lastLogonTS = '' echo "Processing account $acct" # Get user's distinguished name $acctDN = get-aduser $acct -properties distinguishedname | select -expandproperty distinguishedname # Check if account is disabled. If disabled, skip account. $isEnabled = get-aduser $acct -properties enabled | select -expandproperty enabled if ( $isEnabled -eq $false) { echo "$acct is already disabled, skipping." } else { # Get the last logon timestamp for user. If user has no timestamp, this will error (which means user has never logged in) $lastLogonTS = get-aduser $acct -properties lastlogontimestamp | select -expandproperty lastlogontimestamp -ErrorAction SilentlyContinue # If last logon timestamp does not exist, check when the account was created. If the account is older than the threshold, disable. if (!$lastLogonTS) { $acctCreation = get-aduser $acct -properties whencreated | select -expandproperty whencreated if ( $acctCreation -lt $expiration) { echo "$acct has no recorded login and was created more than $days ago (created $acctCreation) which makes it eligible for deactivation." if ($test -eq "NO") { disable-adaccount -identity $acct echo "$acct disabled" $noLogons += "$acct | $acctDN | Created: $acctCreation" } else { $noLogons += "$acct | $acctDN | Created: $acctCreation | TEST ONLY" } } } else { # Convert last logon timestamp from file time to date time $lastLogon = [datetime]::FromFileTime($lastLogonTS) # If last logon timestamp is older than the threshold, disable account. if ($lastLogon -lt $expiration) { echo "$acct's last logon was more than $days days ago ($lastLogon) and is eligible for deactivation." if ($test -eq "NO") { disable-adaccount -identity $acct echo "$acct disabled" $expiredLogons += "$acct | $acctDN | Last Logon: $lastLogon" } else { $expiredLogons += "$acct | $acctDN | Last Logon: $lastLogon | TEST ONLY" } } } } } # Compile report # Start log file $logEnd = get-date -format g write-output "Log for $scriptName`r`nExecuted on $hostName`r`nScript started $logStart`r`nScript ended $logEnd`r`n" | out-file $log # Generate list of users removed from group, if any. if (!$noLogons) { write-output "Accounts older than $days days with no logon were not found (this is good!).`r`n" | out-file -append $log } else { write-output "The following accounts have been disabled because they are older than $days days and have never been used:" | out-file -append $log write-output $noLogons | out-file -append $log write-output "" | out-file -append $log } # Generate list of users added to the group, if any. if (!$expiredLogons) { write-output "Accounts with the last logon older than $days days were not found (yay!)." | out-file -append $log } else { write-output "The following accounts have been disabled because their last logon was more than $days days ago:" | out-file -append $log write-output $expiredLogons | out-file -append $log } # Dump account information to text file to be attached to the email. write-output $noLogons | out-file $delimitedList write-output $expiredLogons | out-file -append $delimitedList # Send log to $emailAddr if variable is set. if (!$emailAddrTo) { write-output "`r`nNo email address specified, no report sent." | out-file -append $log } else { $emailBody = get-content -path $log | out-string send-mailmessage -from "$hostName <$emailAddrFrom>" -to $emailAddrTo -subject "$scriptName Report" -body $emailBody -smtpserver $emailSMTP -attachments $delimitedList }
  • Nginx Active-Passive HA

    31
    1 Votes
    31 Posts
    4k Views
    JaredBuschJ

    @nashbrydges said in Nginx Active-Passive HA:

    @jaredbusch said in Nginx Active-Passive HA:

    @NashBrydges side question. If you setup the .well-known to work correctly, why do you then need the HA? because nginx will never be down except for the momentary reload after the certs are updated.

    That certainly addresses the biggest concern about a long downtime during the renewall process for a high number of certs and probably addresses most concerns with this client. He's already running Veeam replication to a second box so his RTO and RPO are relatively short and within his business tolerance.

    Having said that, it's a great learning opportunity for me to set this up in my lab, if for no other reason than to try it and see how it works.

    Certainly no reason not to do it for a lab. and for a proxy with as much as it sounds like you have in production, it will still be a likely good solution.

  • 2 Votes
    7 Posts
    3k Views
    dbeatoD

    @black3dynamite said in Installing NextCloud Sync Client on Deepin Linux 15.4.1:

    @dbeato said in Installing NextCloud Sync Client on Deepin Linux 15.4.1:

    @jackcpickup said in Installing NextCloud Sync Client on Deepin Linux 15.4.1:

    NextCloud client is available in the Deepin Store now.

    Yep!
    0_1520448979618_DeepinScreenshot_select-area_20180307135611.png

    The latest version is 2.3.3

    Yeah, the packages are outdated, I usually update through command line. The underlying system is debain so in the end I can use packages from Debian.

  • DHCP ranges seperate for IP Phones and PCs?

    31
    2 Votes
    31 Posts
    2k Views
    JaredBuschJ

    here it he powershell method.

    https://docs.microsoft.com/en-us/powershell/module/dhcpserver/add-dhcpserverv4reservation?view=win10-ps

    Add-DhcpServerv4Reservation -ScopeId 10.10.10.0 -IPAddress 10.10.10.8 -ClientId "F0-DE-F1-7A-00-5E" -Description "Reservation for Printer"`
  • site to site VPN only works with Keep Alive

    Unsolved
    23
    2 Votes
    23 Posts
    2k Views
    dbeatoD

    @mike-davis said in site to site VPN only works with Keep Alive:

    @dbeato said in site to site VPN only works with Keep Alive:

    @Mike-Davis How did you end up working out this one?

    I think I left it with the keep alive going and the static IP on both ends.

    great to hear.

  • UBNT is about to update their factory default firmwares

    15
    4 Votes
    15 Posts
    3k Views
    JaredBuschJ

    @thwr said in UBNT is about to update their factory default firmwares:

    @jaredbusch said in UBNT is about to update their factory default firmwares:

    @scottalanmiller said in UBNT is about to update their factory default firmwares:

    @dbeato said in UBNT is about to update their factory default firmwares:

    @jaredbusch said in UBNT is about to update their factory default firmwares:

    @dbeato said in UBNT is about to update their factory default firmwares:

    @jaredbusch said in UBNT is about to update their factory default firmwares:

    @dbeato said in UBNT is about to update their factory default firmwares:

    @scottalanmiller said in UBNT is about to update their factory default firmwares:

    That would be good. That ancient firmware on there is pretty silly.

    Almost all Ubiquiti equipment come with outdate firmware by 2 or 3 months or more at times.

    You have no clue what you are talking about. 2-3 months? Hhhahahaahahahahh

    At least on APs from Amazon their firmware is from January the last AP I bought three days ago. Not sure why you doubt that...

    Because this is a discussion about EdgeMax hardware not Unifi.

    ok, point taken. ER-L came with 1.7.0 last December.

    My most recent one, from four weeks ago, was still 1.2.

    I've never had an ERL shipped to me with anything other than 1.2

    Edit: that is the original firmware btw...

    Got a 1.0 not long ago (ER-48-LITE or 500W, can't remember) ๐Ÿ˜‰

    Not sure what my switches came with Probably were 1.0. The GUI totally changed after updating them.

  • KVM Storage Best Practices?

    6
    2 Votes
    6 Posts
    638 Views
    FATeknollogeeF

    I have mine in 2 directories:
    /data/windows_vm
    /data/linux_vm

    I also have a /data/iso for ISO files

  • 1 Votes
    6 Posts
    1k Views
    gjacobseG

    Outlook for the win..

    Thanks

  • Yamaha Sound Board Network Issues

    6
    1 Votes
    6 Posts
    1k Views
    dbeatoD

    @weston said in Yamaha Sound Board Network Issues:

    a TF5

    I believe that board usually connects via Wireless too, have you tried that?

  • SSDNodes - Anyone used these for hosting?

    17
    0 Votes
    17 Posts
    1k Views
    scottalanmillerS

    @aaronstuder said in SSDNodes - Anyone used these for hosting?:

    Hey Aaron,

    Thanks for sending this over.

    We will be offering more operating systems in the future, by offering LTS OSes now we can ensure the quality of our service.

    Weโ€™ve also been in business for almost 7 years, the annual pricing is lower since weโ€™re able to pass on significant savings with the annual commitment.

    Matt Connor
    Founder & CEO
    Strasmore, Inc.

    How does offering LTS improve quality? Sure lowers it for me. And after seven years they've never gotten around to offering a current OS?

  • Surveillance Cameras and NVR

    18
    1 Votes
    18 Posts
    2k Views
    scottalanmillerS

    I've not used them, but the price and features seem awfully good.

  • Windows Server 2008 EOL?

    5
    1 Votes
    5 Posts
    612 Views
    scottalanmillerS

    I might still have support for two years, but I'm pretty sure "life" ended quite some time ago ๐Ÿ˜‰

  • Veeam Free Windows Server Backup Agent

    Solved
    12
    0 Votes
    12 Posts
    2k Views
    scottalanmillerS

    @dustinb3403 said in Veeam Free Windows Server Backup Agent:

    @jaredbusch said in Veeam Free Windows Server Backup Agent:

    @dustinb3403 said in Veeam Free Windows Server Backup Agent:

    So the biggest item missing from the Veeam Agent for Microsoft Windows is it lacks a central management component.

    Which isn't horrible but it does leave some things to be desired. . .

    No, it is not missing. That is a feature of the Veeam B&R product. You can (or soon can) manage Veeam Endpoints that point to a Veeam B&R instance.

    Yea with licensing, the topic is solved. Veeam Endpoint works without limits. But it lacks a central management interface.

    B&R is a licensed product, right?

    Yes, it is.

  • Install a Basic WordPress Site with WP-CLI

    14
    5 Votes
    14 Posts
    2k Views
    NashBrydgesN

    @tim_g said in Install a Basic WordPress Site with WP-CLI:

    @nashbrydges said in Install a Basic WordPress Site with WP-CLI:

    It allows me access when I set it up without https in the url. But once in settings, and I change the blog address from http://domain.com/blog to https://domain.com/blog I get the same too many redirects error. Cleared history and cache 3 times and still same issue.

    I'm going to blow this install away and recover from backup and will have to install manually.

    Still can't figure out why this issue. The root domain works perfectly with Let's Encrypt but as soon as I get to the blog folder it just shits all over itself.

    How did you set up the whole thing? Did you use my guide? It includes the SSL set up.

    I used your guide up to the SSL setup. I'm running a website in the root directory and Nginx as a proxy.

  • Dell DPACK is now Live Optics!

    5
    5 Votes
    5 Posts
    1k Views
    K

    @dbeato hey bro! I was already using it last year ๐Ÿ™‚ I actually like it. Pretty decent.

  • Bulk Replace Images

    Solved
    11
    1 Votes
    11 Posts
    1k Views
    A

    @momurda was news to me too. Good news! ๐Ÿ™‚

  • Skye for Business Client

    Unsolved
    7
    1 Votes
    7 Posts
    543 Views
    SoIllS

    Maybe look into this:
    https://stackoverflow.com/questions/16213916/change-status-of-lync-by-script

    Good find here, @dbeato. Thank you. I will play around with those scripts.

  • Windows Event Viewer Filter

    25
    2 Votes
    25 Posts
    2k Views
    DustinB3403D

    @dbeato said in Windows Event Viewer Filter:

    @momurda said in Windows Event Viewer Filter:

    @dustinb3403 said in Windows Event Viewer Filter:

    Are these PDF copies of your invoices? Why isn't your invoicing system keeping record of these?

    Invoicing system, what is that?
    These pdfs are generated sales orders in CRM that the finance people turn into invoices to send out to customers. They use QB to do that currently, but we are implementing an ERP which hopefully will automate this 1960s workflow.

    QB has the invoice then and the CRM can make the order again ๐Ÿ™‚

    But QB. . . gah