Search found 78 matches

by Simon Sheppard
2022-Feb-26, 3:52 pm
Forum: Windows PowerShell
Topic: Get-ItemProperty: toggle 0 to 1 or 1 to 0
Replies: 3
Views: 822

Re: Get-ItemProperty: toggle 0 to 1 or 1 to 0

you dont need those brackets within the set-itemproperty parameters

See the syntax here
https://ss64.com/ps/set-itemproperty.html
by Simon Sheppard
2022-Feb-26, 11:13 am
Forum: Windows PowerShell
Topic: Get-ItemProperty: toggle 0 to 1 or 1 to 0
Replies: 3
Views: 822

Re: Get-ItemProperty: toggle 0 to 1 or 1 to 0

In your set-ItemProperty, you need to give it the -path where you want to set the value.
by Simon Sheppard
2022-Feb-23, 5:38 pm
Forum: Windows CMD Shell
Topic: Sophos agent restart/reload policies
Replies: 0
Views: 342

Sophos agent restart/reload policies

Just dropping this here in case it is useful to someone. If you have a Sophos client that is failing to pick up policy changes, this will give it a kick. After restarting it may take 10 minutes or so for the new policy to refresh fully. It has to be run 'As Admin'. @echo off :: run this as administr...
by Simon Sheppard
2022-Feb-11, 5:42 pm
Forum: Windows CMD Shell
Topic: DELTREE is NOT a command!
Replies: 1
Views: 466

Re: DELTREE is NOT a command!

Hi Aacini I have just updated the link. That should have been going to the deltree page here https://ss64.com/nt/deltree.html Arguably it should be categorised under the How-to pages rather than in the main A-Z + categorized list but the reason I created that page is that there were SO MANY searches...
by Simon Sheppard
2022-Feb-05, 5:11 pm
Forum: Windows CMD Shell
Topic: How to read a file in UTF-8 and remove a BOM in batch script?
Replies: 1
Views: 4743

Re: How to read a file in UTF-8 and remove a BOM in batch script?

Some answers to this here If you're using PowerShell [Core] version 6 or higher, you get BOM-less UTF-8 files by default https://stackoverflow.com/questions/40098771/changing-powershells-default-output-encoding-to-utf-8/40098904#40098904 PowerShell is much better suited to the task of dealing with e...
by Simon Sheppard
2022-Feb-02, 6:03 pm
Forum: Linux & macOS Bash
Topic: Wordle in 50 lines of Bash
Replies: 0
Views: 561

Wordle in 50 lines of Bash

For the uninitiated, Wordle presents the player with a daily puzzle in which a five-letter word must be guessed with hints regarding correct letters in the correct (or incorrect) places.

https://gist.github.com/huytd/6a1a6a7b3 ... 47e3d01513
by Simon Sheppard
2022-Jan-25, 10:57 am
Forum: Meta: Site Feedback / Forum Q&A
Topic: 503 Service Unavailable
Replies: 0
Views: 543

503 Service Unavailable

Quite a few people have been getting '503 Service Unavailable' returned when visiting SS64.com since around Jan 21st. This is caused by a bug in the Google provided cookie consent service which I disabled on Saturday 22nd. (It returns a fatal server error which fail2ban then interprets as a maliciou...
by Simon Sheppard
2022-Jan-23, 1:30 pm
Forum: Windows CMD Shell
Topic: CMD Prompt: Copying to Clipboard Adds Trailing Space
Replies: 1
Views: 483

Re: CMD Prompt: Copying to Clipboard Adds Trailing Space

I think what is happening here is that the carriage return/newline are converted into a space If we try this (for %a in (red green blue) do @(echo %a)) | find "e">demo.txt it adds those spaces, the same as clip - so the problem is in the pipe not in the clip utility. In PowerShell: PS C:\>...
by Simon Sheppard
2022-Jan-22, 11:42 am
Forum: Meta: Site Feedback / Forum Q&A
Topic: Keyboard shortcuts to navigate SS64.com
Replies: 0
Views: 323

Keyboard shortcuts to navigate SS64.com

The A-Z index pages now have keyboard shortcuts from [a] to [z] to quickly scroll up / down. The detail pages have [s] for Syntax and [e] to jump to Examples, [a] will go to the top of the page. There is also [\] to set focus on the site search box. This also involved some CSS changes so if the sear...
by Simon Sheppard
2022-Jan-20, 6:35 pm
Forum: Windows CMD Shell
Topic: stampme.cmd anyway to make it use 2 digit month and day and am/pm
Replies: 4
Views: 1244

Re: stampme.cmd anyway to make it use 2 digit month and day and am/pm

Thanks for the heads up! That robocopy script failed for me on the latest Windows 10, but this version looks promising @echo off for /f "tokens=1-6 delims=/: " %%a in ('robocopy "|" . /njh ^| find ":"') do ( set "_year=%%a" & set "_month=%%b" &am...