<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dan Wheeler</title>
    <description>The latest articles on DEV Community by Dan Wheeler (@x2i).</description>
    <link>https://dev.to/x2i</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1095920%2F10c7437c-9b72-4fb9-8c19-c35224ab1b21.jpeg</url>
      <title>DEV Community: Dan Wheeler</title>
      <link>https://dev.to/x2i</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/x2i"/>
    <language>en</language>
    <item>
      <title>Hard Reset iPhone SE</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Tue, 06 Jun 2023 07:46:08 +0000</pubDate>
      <link>https://dev.to/x2i/hard-reset-iphone-se-182p</link>
      <guid>https://dev.to/x2i/hard-reset-iphone-se-182p</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Quickly press the volume up button&lt;/li&gt;
&lt;li&gt;Quickly press the volume down button&lt;/li&gt;
&lt;li&gt;Press and hold the side (power) button until you see activity and then release.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This should force the phone to reboot&lt;/p&gt;

</description>
      <category>iphone</category>
      <category>force</category>
      <category>reboot</category>
      <category>hardreset</category>
    </item>
    <item>
      <title>Windows - Auto Login via the Registry</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Tue, 06 Jun 2023 07:41:48 +0000</pubDate>
      <link>https://dev.to/x2i/windows-auto-login-via-the-registry-3ibj</link>
      <guid>https://dev.to/x2i/windows-auto-login-via-the-registry-3ibj</guid>
      <description>&lt;p&gt;In the Windows registry editor (regedit), browse to the following key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set string key &lt;strong&gt;'AutoAdminLogon'&lt;/strong&gt; to 1.&lt;/p&gt;

&lt;p&gt;Set string key &lt;strong&gt;'DefaultUserName'&lt;/strong&gt; to the username you wish to use.&lt;/p&gt;

&lt;p&gt;Set string key &lt;strong&gt;'DefaultPassword'&lt;/strong&gt; to the password of the account.&lt;/p&gt;

&lt;p&gt;If on a domain, set string key &lt;strong&gt;'DefaultDomainName'&lt;/strong&gt; to the short name of the domain.&lt;/p&gt;

&lt;p&gt;You can also set string &lt;strong&gt;'DontDisplayLastUserName'&lt;/strong&gt; to 0 if you don't wish to show the last logged on user at all.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If any of the above keys are missing, you may need to add them as new string keys.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>windows</category>
      <category>registry</category>
      <category>regedit</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>PSEXEC - Run EXE's on the Windows Login Screen</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Tue, 06 Jun 2023 07:37:25 +0000</pubDate>
      <link>https://dev.to/x2i/psexec-run-exes-on-the-windows-login-screen-49n4</link>
      <guid>https://dev.to/x2i/psexec-run-exes-on-the-windows-login-screen-49n4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This tutorial assumes that you have &lt;a href="https://docs.microsoft.com/en-us/sysinternals/downloads/psexec"&gt;PSEXEC&lt;/a&gt; installed on your machine at the location of C:\psexec.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;• Open a CMD Prompt window.&lt;/p&gt;

&lt;p&gt;• Navigate to the PSEXEC folder on your machine.&lt;/p&gt;

&lt;p&gt;• Run the following command - where cmd.exe is the path to the exe you wish to run (may need to use the full folder path if it isn't one of the standard Windows apps like notepad.exe, calc.exe or cmd.exe):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;psexec -sx notepad.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;• Now Lock the machine (or log out) and the exe file you chose above will be present.&lt;/p&gt;

</description>
      <category>psexec</category>
      <category>cmd</category>
      <category>commandprompt</category>
      <category>exe</category>
    </item>
    <item>
      <title>Powershell - Get Logged On Users</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 15:18:29 +0000</pubDate>
      <link>https://dev.to/x2i/powershell-get-logged-on-users-304o</link>
      <guid>https://dev.to/x2i/powershell-get-logged-on-users-304o</guid>
      <description>&lt;p&gt;To get the names of users that are logged into a machine via Powershell, use this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To query another machine, use this whilst replacing the #'s with the machine number that you wish to query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query user /server:#######
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The results will show the usernames of those who are logged into the machine as well as who is currently active.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Powershell - Enable/Disable Internet Adapters</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 15:13:24 +0000</pubDate>
      <link>https://dev.to/x2i/powershell-enabledisable-internet-adapters-1mj9</link>
      <guid>https://dev.to/x2i/powershell-enabledisable-internet-adapters-1mj9</guid>
      <description>&lt;p&gt;Run a Powershell command prompt as your Admin account and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Get-NetAdapter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make note of the name of the adapter you want to disable/enable and then type either of the following depending on what you need - substituting the part in &amp;lt;ADAPTER_NAME&amp;gt; with the name of the adapter you wish to change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Disable-NetAdapter -Name "&amp;lt;ADAPTER_NAME&amp;gt;" -Confirm:$false

Enable-NetAdapter -Name "&amp;lt;ADAPTER_NAME&amp;gt;" -Confirm:$false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>powershell</category>
      <category>tutorial</category>
      <category>netadapter</category>
      <category>windows</category>
    </item>
    <item>
      <title>Powershell - Get Hard Drive Size and Free Space</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 15:10:52 +0000</pubDate>
      <link>https://dev.to/x2i/powershell-get-hard-drive-size-and-free-space-2h04</link>
      <guid>https://dev.to/x2i/powershell-get-hard-drive-size-and-free-space-2h04</guid>
      <description>&lt;p&gt;Run the following in a Powershell window&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$disk = Get-WmiObject Win32_LogicalDisk -Filter "DeviceID='C:'" | Select-Object Size, FreeSpace

Write-Host ("{0}GB total" -f [math]::truncate($disk.Size / 1GB))

Write-Host ("{0}GB free" -f [math]::truncate($disk.FreeSpace / 1GB))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get a different drive letter, just change the C: in &lt;em&gt;"DeviceID='C:'"&lt;/em&gt; to whatever drive you want.&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>windows</category>
      <category>hdd</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Print from Powershell</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 14:28:14 +0000</pubDate>
      <link>https://dev.to/x2i/print-from-powershell-4e68</link>
      <guid>https://dev.to/x2i/print-from-powershell-4e68</guid>
      <description>&lt;p&gt;Run this in Powershell - substituting the &amp;lt;NAMEOFPRINTER&amp;gt; with the name of a printer installed on your machine (or remove it entirely to use default printer):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'Hello World' | Out-Printer '&amp;lt;NAMEOFPRINTER&amp;gt;'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;To print a specific file, it's:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Get-Content 'C:\MyNote.txt' | Out-Printer '&amp;lt;NAMEOFPRINTER&amp;gt;'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Can also be used within &lt;a href="https://learn.microsoft.com/en-us/sysinternals/downloads/psexec"&gt;PSEXEC&lt;/a&gt; to send prints from remote computers - obviously you'll need to specify the name of a printer which is actually installed on that computer.&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>printing</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Command Prompt - Set Timezone</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 14:09:26 +0000</pubDate>
      <link>https://dev.to/x2i/batch-set-timezone-2afd</link>
      <guid>https://dev.to/x2i/batch-set-timezone-2afd</guid>
      <description>&lt;p&gt;Copy the following code into a Command Prompt window - when run it will change the timezone of the computer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TZUTIL /s "GMT Standard Time"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Naturally, you can change this to any timezone, not just GMT. To see a list of all available timezones, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TZUTIL /l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will print out a list of them all.&lt;/p&gt;

</description>
      <category>cmd</category>
      <category>timezone</category>
      <category>tutorial</category>
      <category>windows</category>
    </item>
    <item>
      <title>Command Prompt - Dealing with Tasks</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 14:06:11 +0000</pubDate>
      <link>https://dev.to/x2i/command-prompt-dealing-with-tasks-496c</link>
      <guid>https://dev.to/x2i/command-prompt-dealing-with-tasks-496c</guid>
      <description>&lt;p&gt;We can use commands to find out what tasks are running on a machine. Also note, all of these can be run using PSEXEC to a remote machine (some may require connection via PSEXEC using your admin account also).&lt;/p&gt;




&lt;h2&gt;
  
  
  See a list of tasks
&lt;/h2&gt;

&lt;p&gt;First, open Command Prompt and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tasklist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will return results in a crude looking table showing you the Image Name (filename of the application), it's PID (or ID Number), the session name, number and how much memory it is currently using. Only the image name and PID are relevant here.&lt;/p&gt;




&lt;h2&gt;
  
  
  Export task list to text file
&lt;/h2&gt;

&lt;p&gt;This will dump a huge list of tasks that the computer is currently running (the same list you'd find in Task Manager). The formatting though leaves something to be desired, so you may wish to dump the results to a text file like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tasklist &amp;gt; c:\tasklist.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Find a specific task
&lt;/h2&gt;

&lt;p&gt;Next up, we can search for individual tasks by using the below, remember seeing the Image Name earlier? This example will return all found results for Outlook:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tasklist /fi "imagename eq outlook.exe"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also do a partial search using something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tasklist /v | find "Note"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a /i at the end to make it case-insensitive too!&lt;/p&gt;




&lt;h2&gt;
  
  
  Kill a task
&lt;/h2&gt;

&lt;p&gt;Also remember earlier we saw that the tasklist results produced a PID for each task... we can kill a task by using the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;taskkill /F /PID ####
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we replaced the #### with the actual PID number of the task we want to kill, it will work. Although, be careful as it will force close the application without saving anything or backing it up.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;Useful to Know!&lt;br&gt;
All the below can be run through &lt;a href="https://learn.microsoft.com/en-us/sysinternals/downloads/psexec"&gt;PSEXEC&lt;/a&gt; too for dealing with tasks on a remote machine.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>commandprompt</category>
      <category>cmd</category>
      <category>windows</category>
      <category>tasks</category>
    </item>
    <item>
      <title>Run Microsoft Edge in Kiosk Mode</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 13:57:36 +0000</pubDate>
      <link>https://dev.to/x2i/run-microsoft-edge-in-kiosk-mode-32ek</link>
      <guid>https://dev.to/x2i/run-microsoft-edge-in-kiosk-mode-32ek</guid>
      <description>&lt;p&gt;Copy the below into a text editor and save it as a .bat file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;start "" "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --kiosk www.google.com --edge-kiosk-type=fullscreen -no-first-run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;To explain the flags:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;--kiosk&lt;/strong&gt; removes the address bar, menu bar, status bar etc... and prevents alt/right clicking - essentially locking it down completely&lt;/p&gt;

&lt;p&gt;Then you put the web page you wish to run,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;--edge-kiosk-type=fullscreen&lt;/strong&gt; makes it fullscreen&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-no-first-run&lt;/strong&gt; prevents the initial Edge startup process when used for the first time or after an update. Meaning it loads straight to the web page.&lt;/p&gt;

</description>
      <category>microsoft</category>
      <category>edge</category>
      <category>kiosk</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>VBScript - Text to Speech/Play Sound</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 13:50:23 +0000</pubDate>
      <link>https://dev.to/x2i/vbscript-text-to-speechplay-sound-249i</link>
      <guid>https://dev.to/x2i/vbscript-text-to-speechplay-sound-249i</guid>
      <description>&lt;p&gt;Create a .vbs file with the following code, and it will play a sound and also say something out loud of your choosing... neat huh?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set oV = CreateObject("SAPI.SpVoice")
Set oFS = CreateObject("SAPI.SpFileStream")
oFS.Open "C:\Windows\Media\tada.wav"
oV.SpeakStream oFS
oFS.Close
oV.Speak "Hello World!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>vbscript</category>
      <category>texttospeech</category>
      <category>tutorial</category>
      <category>sound</category>
    </item>
    <item>
      <title>Batch - Turn Volume Up to 100%</title>
      <dc:creator>Dan Wheeler</dc:creator>
      <pubDate>Mon, 05 Jun 2023 13:41:33 +0000</pubDate>
      <link>https://dev.to/x2i/batch-turn-volume-up-to-100-4dba</link>
      <guid>https://dev.to/x2i/batch-turn-volume-up-to-100-4dba</guid>
      <description>&lt;p&gt;In Windows, you can create a batch file that when run, turns the computers volume all the way up to 100%. Simply copy the below into a text editor and save as a .bat file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@if (@a==@b) @end /*
:: batch portion
@ECHO OFF
cscript /e:jscript "%~f0"

:: JScript portion */
var shl = new ActiveXObject("WScript.Shell");
for (var i=0; i&amp;lt;50; i++) {
    shl.SendKeys(String.fromCharCode(0xAF));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>windows</category>
      <category>batch</category>
      <category>tutorial</category>
      <category>volume</category>
    </item>
  </channel>
</rss>
