One of my favourite features of PowerShell is the Invoke-RestMethod cmdlet which (among a great many other things) can download the data from an RSS feed. One application I’ve found for this is to stay on top of security bulletins from organisations like Adobe and Drupal.
However just downloading the data from the feed and kicking it out in an email isn’t quite good enough for my needs thus the script below gets data from a CSV which contains the URL to the feed as well as some extra details to inject into any email notification (e.g. a link to the guide on how to deploy Adobe Updates).
In my production environment this script creates tickets on a FreskDesk helpdesk to log and manage any new update notifications. In the attached example below the script just fires off email notifications.
Have a look at the screenshot sequence below for more info!
Get-Rss (4.0 KiB, 774 hits)
Update 09/05/2017 – v0.2 – Now handles XML and Arrays in the link and title objects (good for reddit and blogspot!)
So this post is a more a reminder to me than anything else but…having recently come across the Microsoft TechNet article ‘Keyboard Shortcuts for the Windows PowerShell ISE’ (https://msdn.microsoft.com/powershell/scripting/core-powershell/ise/keyboard-shortcuts-for-the-windows-powershell-ise) I thought it necessary to highlight the two keyboard shortcuts….
Ctrl + J – brings up a list of code snippet templates (e.g. try-catch-finally and do-until)
Ctrl + M – expand or collapse braces
See the screenshots below for a demo and do make sure you try them yourself!
Looking for some fun ways to get more out of your your Smart Card deployment? If so have you tried……?
- Use Smart Cards to login to your Servers via Remote Desktop
- Use Smart Cards with the PowerShell Get-Credential Commandlet
- Use Smart Cards with your Firewall for single sign on
- Use Smart Cards to login to IIS Web Applications (just a box to tick and a radio option to select)
- Store multiple identities on your Smart Card and assign different (and perhaps more complex) PINs to the identities
Have a look at the screen shots below for some more details…
So first things first….the title of this article is misleading; thus far Avid do not seem to have released a sounds pack specific for Sibelius 8 as you will see on the website when you login in (https://my.avid.com/account/orientation) the only option is for the 7.5 sounds pack. But…this works!
Now deploying Sibelius it’s self in a silent manner is (in my opinion) pretty well documented at this link – http://avid.force.com/pkb/articles/en_US/how_to/en396971.
When you get to the sounds the documentation (again in my opinion) (which can be found here – http://avid.force.com/pkb/articles/en_US/How_To/Installing-and-using-Sibelius-Sounds-across-a-network) is flaky at best not to mention the confusion around version 7/7.5/8.
For example the install path is listed as C:\Program Files (x86)\Avid\Sibelius Sounds\Sibelius 7 Sounds, well Sibelius 8 is x64 only so do we put it in the C:\Program Files folder instead? The registry entry is listed as HKEY_LOCAL_MACHINE\SOFTWARE\Avid\Sibelius Sounds\Sibelius 7 Sounds\ContentPath – well again do we update this to be ‘Sibelius 8 Sounds’?
Well as it transpires their guide is correct in all respects; however, as it states in the clear there is no silent install command for the sounds. Ultimately though its just a copy and paste operation with the addition of a registry key so lets use some PowerShell to get this software deployed! Continue reading
One of those monthly jobs that every SysAdmin will come across is good old Patch Tuesday; to help make Patch Tuesday a little more fun after all of the servers have been updated I use Hyper-V Replica (run by a PowerShell script) to shutdown each Virtual Machine and move it onto another host (ticks the box for the machine reboot component of Windows Updates and also tests our DR solution in one hit!).
However as both of my DCs are Virtual Machines I want to make sure that at least one DC is up at all times, to do that I have built a little PowerShell function (see below to download it within a zip file!) that is run before every migration to ensure that both DCs are up and running (along with the Network Policy Server service which is used to authenticate clients on the network (and so is very important!!)) before any migration happens.
Hopefully this will help someone someday!
See if DCs are up (905 bytes, 646 hits)
Following from Automated backup for your network switches with WinSCP and PowerShell you can take things one step further and with a little more PowerShell its possible to get email reports on any changes between switch configs.
This kind of setup would be useful for any sized organisation who have a need to ensure changes are logged or want to ensure that no one has maliciously changed a configuration.
The setup is simple, just as with the automated backup these will need to be extracted to your C:\Network Switch Backup folder which should look something like the screenshot to the right once done.
I’ve also included an updated .cmd file which calls the Backup Network Switches.ps1 script and then the Compare Configs.ps1 script in turn.
Network Switch Change Log (1.6 KiB, 1,024 hits)
There is plenty of description within the PowerShell file; even a little error handling as well! Be sure to edit lines 6-8 with your SMTP settings.
Although it may not be the most glamorous side of IT every sysadmin will appreciate the value of a rock solid backup system. All too often though these systems do not extend down to the ’embedded’ systems like network switches and firewalls.
However with a little WinSCP (and its fantastic .NET assembly automation package) and PowerShell combined its pretty easy to cook up something that is 100% less of the cost of any management solution.
This guide shows how to setup the backup of a HP ProCurve switch (I’ve tested it with the ProCurve 8200 series, 5400 series the 2920s, a 2626 and a 2530 all of which were running the most recent firmware) although it should be a simple matter of changing the relevant paths to make it work with other manufacturers kit (e.g. Cisco).
First up grab the source files from the link below and extract the contents to C:\Network Switch Backup (you can use any other path but will just need to update the paths inside the PowerShell) you should then have a folder which contains a .cmd file, a .ps1, a sample .csv and a sub folder called Backups.
Network Switch Backup (1.7 KiB, 3,800 hits)
Getting your Switch ready and filling out the CSV
Each switch will now need ip ssh and ip ssh filetransfer running on it through the CLI (if its not already setup); be sure to set a manager password (if you haven’t done so already!) as well. In addition you will need to find the Server host key fingerprint for each switch; the screen shots below show one way of doing this.