Using Azure DevOps Artifact Feed in PowerShell

By Jake Edwards | Wednesday, January 13th, 2021 | Permalink | No Comments

Your Artifact Feed URL can be used as a PackageSource in PowerShell for Install-Package.

Note that the URL provided when pressing Connect to Feed has a v3 when only v2 appears to work at this time.

Credentials can be a Personal Access Token (PAT) with your email and PAT key. Requires Packaging (Read).

  • XXXXX is your Organization Name
  • YYYYY is your Project Name (Project Scoped Only)
  • ZZZZZ is your Feed Name
$credentials = Get-Credentials

Register-PackageSource -Trusted -ProviderName "PowerShellGet" -Name "MyGallery" -Location "https://pkgs.dev.azure.com/XXXXX/YYYYY/_packaging/ZZZZZZ/nuget/v2/" -Credential $credentials

Installing a package from the feed

When installing a specific package, you can pass the same Credentials object as you used above.

Install-Package <PackageName> -Credential $credentials

AzCopy Batch File with SAS Token: The remote server returned an error (403) Forbidden

By Jake Edwards | Thursday, August 18th, 2016 | Permalink | 13 Comments

I was recently trying to copy some files from Azure using an SAS token. It was failing with the following error;

The remote server returned an error: (403) Forbidden.
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

When run manually in the command line — it’d work.

Turns out it was purely because it was running with a batch file, the % signs (common in the SAS Signature) don’t play nice with batch files.
Changing the % in the signature to %% escaped them, and let it run normally.

Hoping this saves someone else 1 hour ūüėČ

DisplayPort Screen Blank after Boot or Sleep with Asus STRIX GTX 970 Series

By Jake Edwards | Sunday, March 27th, 2016 | Permalink | 4 Comments

Seems there’s an issue with the Asus Strix GTX 970 card when using specifically the DisplayPort (DP) connector on certain monitor models.

Symptoms


I found my screen (Dell U2713H) would suggest there was “No Signal” coming from the PC at certain times. More confusingly, intermittently;

  • Black screen/No Signal when first turning on the PC
  • Black screen/No Signal when resuming from Sleep
  • Black screen/No Signal between the Windows 10 boot screen and the login screen.

Solution


When you finally get it too boot without issue, you need to update the VBIOS of your graphics card.

I believe I was on version¬†84.04.36.00.AS15, however since updating to 84.04.84.00.AS17 I haven’t had an issue.

You can download the new VBIOS from Asus’ Support Website. It has the description “Fix DP display issue with certain monitors”

There are some older VBIOS versions too;¬†84.04.2F.00.AS05 & 84.04.1F.00.AS13 & 84.04.1F.00.AS08¬†though I can’t confirm they had the same issue.

If you need to check the version of your VBIOS, you can use the GPU Tweak II download on the same page (though don’t trust the LiveUpdate as it didn’t pick up this update).

Asus STRIX GTX970 on GPU Tweak II

 

OpenWRT and GRE: Error 806

By Jake Edwards | Saturday, September 12th, 2015 | Permalink | 1 Comment

Trying to connect to a VPN failed while running behind my OpenWRT router (Chaos Calmer) from a Windows LAN client.

Adding the following software package to the router resolved the issue;

  • kmod-nf-nathelper-extra

The original error was;

806: The VPN connection between your computer and the VPN server could not be completed. The most common cause for this failure is that at least one Internet device (for example, a firewall or a router) between your computer and the VPN server is not configured to allow Generic Routing Encapsulation (GRE) protocol packets. If the problem persists, contact your network administrator or Internet Service Provider.

Force a reserved Windows 10 update early

By Jake Edwards | Saturday, August 1st, 2015 | Permalink | No Comments

To force an early Windows 10 upgrade from Windows 7 or Windows 8, follow one of the two methods below. You will need administrative privileges to run the update.

ForceWin10update

Method 1 – Registry

  1. Locate the registry key:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade
  2. Create a new DWORD (32-bit) Value with the name AllowOSUpgrade, and set the value to 1.
  3. Run “Check for Updates” in Windows Update

Method 2 – Command Line

  1. Remove all files in C:\Windows\SoftwareDistribution\Download
    • It seems Windows 10 won’t install with existing pending updates.
    • These files are temporary storage for Windows Update so it’s¬†okay¬†to delete them
  2. Open Command Prompt and type;

    wuauclt.exe /updatenow

  3. Open Windows Update from the Control Panel and you should see the update starting to download.
  4. If you get a Windows Update error, make sure you cleared the directory out above, and restart your PC.

 

Searching Active Directory from any domain PC

By Jake Edwards | Tuesday, April 14th, 2015 | Permalink | No Comments

If you’re on a domain and would like to search Active Directory from any PC, you can run the following command to open the Active Directory¬†query window.

  1. Start > Run
  2. SystemRoot%\SYSTEM32\rundll32.exe dsquery,OpenQueryWindow

SearchActiveDirectory

Internet Connection Sharing has been disabled by the Network Administrator – Windows 7, Windows 8, Windows 10

By Jake Edwards | Tuesday, March 31st, 2015 | Permalink | 24 Comments

To manually workaround this issue you need to jump into the registry to enable ICS. This is usually deployed via Group Policy on a domain network.

As usual, be careful editing the registry.

The Workaround

  1. Start > Run > gpedit.msc
  2. Locate;
    • Computer Configuration/Administrative Templates/Network/Network Connections
  3. Disable the following policies;
    • Prohibit installation and configuration of Network Bridge on your DNS domain network
    • Prohibit use of Internet Connection Firewall on your DNS domain network
    • Prohibit use of Internet Connection Sharing on your DNS domain network
    • Require domain users to elevate when setting a network‚Äôs location
  4. Start > Run > regedit
  5. Locate;
    • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections
  6. Add/update a registry DWORD entry for the following, and set it to 1;
    • NC_PersonalFirewallConfig
    • NC_ShowSharedAccessUI

Thanks to Jeff for the find.

Find the BIOS Version from the Command Line and Powershell

By Jake Edwards | Tuesday, March 24th, 2015 | Permalink | No Comments

Similar to finding the Dell Service Tag via the command line, we can use WMI to retrieve the BIOS Version.

This is useful for finding out whether your PC is up-to-date with the BIOS revisions provided by the manufacturer.

Command Line


wmic bios get smbiosbiosversion

Powershell (Local)


(Get-WmiObject win32_bios).SMBIOSBIOSVersion

Powershell (Remote)


(Get-WmiObject win32_bios -computer COMPUTERNAME).SMBIOSBIOSVersion

Find a Dell Service Tag from the Command Line and Powershell

By Jake Edwards | Tuesday, March 10th, 2015 | Permalink | No Comments

No-one likes rearranging their desk to find the little white sticker. It can be run from regular command or PowerShell session. Administrator permissions aren’t required.

Here is how to find it via Windows:

Command Prompt

wmic bios get serialnumber

Powershell

(Get-WmiObject win32_bios).SerialNumber

Powershell (Remote Computer)

(Get-WmiObject win32_bios -computer COMPUTERNAME).SerialNumber

Dell BIOS Utility Command-Line Arguments

By Jake Edwards | Monday, July 18th, 2011 | Permalink | 2 Comments

Dell BIOS updates have some undocumented command line switches that may be useful for system administrators. These are a few of the notable command-line arguments;

In order to bypass the Battery and AC adaptor check when attempting a BIOS update for a Dell laptop, simply run it with the /forceit command, for example;

  • DELL_BIOS_A10.exe /forceit

You can also extract the actual image using commands like writeromfile, for example;

  • DELL_BIOS_A10.exe -writeromfile

Dell use a variety of update programs depending on the age of the computer, so some commands may be deprecated or renamed. Let me know in teh comments if you find any other interesting Dell BIOS command line switches.

Next Page »