Get-ChildItem -Path . -Recurse -File | Select-Object FullNameThis script performs a recursive search starting from the current directory (.), finds all files (excluding folders), and outputs their full paths.
Computer, Technology, Databases, Google, Internet, Mobile, Linux, Microsoft, Open Source, Security, Social Media, Web Development, Business, Finance
Search This Blog
Google Analytics
Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts
Friday, November 07, 2025
Recursively List All Files with PowerShell
If you are working with PowerShell and need a fast way to list all files in a directory, including those buried in subfolders, this one-liner will work:
Tuesday, October 14, 2025
PowerShell Tip: Bulk Appending File Extensions with One-Liner Magic
Ever found yourself staring at a folder full of files and wishing you could batch append them all with a .txt suffix? PowerShell makes this delightfully simple with a one-liner:
Get-ChildItem -File | Rename-Item -NewName {$_.Name + '.txt'}
To expand further to include files in all sub folders, use below instead.
Get-ChildItem -File -Recurse | Rename-Item -NewName { $_.Name + '.txt' }
If you wish to rollback what you just did, use the following:
Get-ChildItem -Path . -Recurse -File -Filter "*.txt" | ForEach-Object {
$newName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name)
Rename-Item -Path $_.FullName -NewName $newName
}
Feel free to replace the txt with a different one based on your needs!
Tuesday, August 15, 2017
Group Internet Explorer Tabs Into One Icon In Taskbar
One annoying default "feature" of Internet Explorer is it displays each tab as separate taskbar icon. This is unlike other browsers like Chrome and Firefox. To get around this, try the following steps:
- Tools → Internet Options
- Under the General tab, click on Tabs button.
- Make sure 'Show previews for individual tabs in the taskbar' option is unchecked.
- Click OK to apply changes.
- Re-launch Internet Explorer.
IE tabs should now be grouped into one single icon in the taskbar.
Wednesday, July 26, 2017
Windows - Icon Not Showing Correctly Fix
If you find that icons of your applications are not showing correctly on your Windows 7, your Icon Cache may be corrupted. The Icon Cache or IconCache.db is a special database file that Windows uses to make drawing icons of applications faster without having to get from individual application each time.
To be able to get the icons displayed correctly again, IconCache.db has to be rebuilt.
Your icons should be back!
To be able to get the icons displayed correctly again, IconCache.db has to be rebuilt.
- Launch Task Manager.
- Look for explorer.exe process and end it.
- Locate IconCache.db and delete it. In Windows 7/8, the IconCache.db file can be found at C:\Users\%Username%\AppData\Local\. (you may need to enable to show hidden files before you can locate IconCache.db).
- From Task Manager, click on File > New Task (Run).
- Type explorer.exe and then click on OK button.
Your icons should be back!
Monday, July 17, 2017
Restore Database Backup Over a Network Drive
How do you restore a Microsoft SQL database backup over a network drive without having to download to local? Since the database server is run as a service under an account that often without network access permission, it wouldn't be possible to be able to select the network drive/path when you are performing a restore. Nonetheless, we are not left without workaround.
To restore database backup over a network, you will need to run the following SQL statements using your SQL Management Studio.
Once the above are executed, you should be able to choose Z:\ network drive to restore your database backup file. I hope it helps.
To restore database backup over a network, you will need to run the following SQL statements using your SQL Management Studio.
--enable to show advanced options EXEC sp_configure 'show advanced options', 1 GO --apply changes for show advanced options RECONFIGURE GO --enable xp_cmdshell EXEC sp_configure 'xp_cmdshell', 1 GO --apply changes for xp_cmdshell RECONFIGURE GO --replace network path, username and password accordingly EXEC xp_cmdshell 'NET USE Z: \\SERVER\Path password /USER:Domain\Username' GO
Once the above are executed, you should be able to choose Z:\ network drive to restore your database backup file. I hope it helps.
Tuesday, May 16, 2017
SharePoint 2013 Site Template ID List for PowerShell
If you are creating a new SharePoint site collection using PowerShell, you can specify the template to be applied. To do that, PowerShell expects you to provide the Template ID. The following is a list of template ids which may come handy.
» SharePoint 2013 Site Template ID List for PowerShell | Absolute SharePoint Blog
| Template ID | Title |
|---|---|
| GLOBAL#0 | Global template |
| STS#0 | Team Site |
| STS#1 | Blank Site |
| STS#2 | Document Workspace |
| MPS#0 | Basic Meeting Workspace |
| MPS#1 | Blank Meeting Workspace |
| MPS#2 | Decision Meeting Workspace |
| MPS#3 | Social Meeting Workspace |
| MPS#4 | Multipage Meeting Workspace |
| CENTRALADMIN#0 | Central Admin Site |
| WIKI#0 | Wiki Site |
| BLOG#0 | Blog |
| SGS#0 | Group Work Site |
| TENANTADMIN#0 | Tenant Admin Site |
| APP#0 | App Template |
| APPCATALOG#0 | App Catalog Site |
| ACCSRV#0 | Access Services Site |
| ACCSRV#1 | Assets Web Database |
| ACCSRV#3 | Charitable Contributions Web Database |
| ACCSRV#4 | Contacts Web Database |
| ACCSRV#5 | Projects Web Database |
| ACCSRV#6 | Issues Web Database |
| ACCSVC#0 | Access Services Site Internal |
| ACCSVC#1 | Access Services Site |
| BDR#0 | Document Center |
| DEV#0 | Developer Site |
| DOCMARKETPLACESITE#0 | Academic Library |
| EDISC#0 | eDiscovery Center |
| EDISC#1 | eDiscovery Case |
| OFFILE#0 | (obsolete) Records Center |
| OFFILE#1 | Records Center |
| OSRV#0 | Shared Services Administration Site |
| PPSMASite#0 | PerformancePoint |
| BICenterSite#0 | Business Intelligence Center |
| SPS#0 | SharePoint Portal Server Site |
| SPSPERS#0 | SharePoint Portal Server Personal Space |
| SPSPERS#2 | Storage And Social SharePoint Portal Server Personal Space |
| SPSPERS#3 | Storage Only SharePoint Portal Server Personal Space |
| SPSPERS#4 | Social Only SharePoint Portal Server Personal Space |
| SPSPERS#5 | Empty SharePoint Portal Server Personal Space |
| SPSMSITE#0 | Personalization Site |
| SPSTOC#0 | Contents area Template |
| SPSTOPIC#0 | Topic area template |
| SPSNEWS#0 | News Site |
| CMSPUBLISHING#0 | Publishing Site |
| BLANKINTERNET#0 | Publishing Site |
| BLANKINTERNET#1 | Press Releases Site |
| BLANKINTERNET#2 | Publishing Site with Workflow |
| SPSNHOME#0 | News Site |
| SPSSITES#0 | Site Directory |
| SPSCOMMU#0 | Community area template |
| SPSREPORTCENTER#0 | Report Center |
| SPSPORTAL#0 | Collaboration Portal |
| SRCHCEN#0 | Enterprise Search Center |
| PROFILES#0 | Profiles |
| BLANKINTERNETCONTAINER#0 | Publishing Portal |
| SPSMSITEHOST#0 | My Site Host |
| ENTERWIKI#0 | Enterprise Wiki |
| PROJECTSITE#0 | Project Site |
| PRODUCTCATALOG#0 | Product Catalog |
| COMMUNITY#0 | Community Site |
| COMMUNITYPORTAL#0 | Community Portal |
| SRCHCENTERLITE#0 | Basic Search Center |
| SRCHCENTERLITE#1 | Basic Search Center |
| SRCHCENTERFAST#0 | FAST Search Center |
| visprus#0 | Visio Process Repository |
» SharePoint 2013 Site Template ID List for PowerShell | Absolute SharePoint Blog
Thursday, April 28, 2016
SharePoint - Site URL Inaccessible from the Server
Despite you having set the 'alternate access mapping' e.g. http://domain.com/, and added the domain url into the server's hosts file, accessing the SharePoint site may encounter HTTP 401 authentication error from the server itself. This issue does not happen if you accessed it from outside.
One cause of this behaviour is related to the loopback security check the Windows server is doing. There are two workarounds as described by an article from Microsoft KB and the following are sufficient to make it work great for me.
One cause of this behaviour is related to the loopback security check the Windows server is doing. There are two workarounds as described by an article from Microsoft KB and the following are sufficient to make it work great for me.
- Click Start, click Run, type regedit, and then click OK.
- In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
- Right-click Lsa, point to New, and then click DWORD Value.
- Type DisableLoopbackCheck, and then press ENTER.
- Right-click DisableLoopbackCheck, and then click Modify.
- In the Value data box, type 1, and then click OK.
- Quit Registry Editor, and then restart your computer.
Wednesday, April 27, 2016
Unable to view Roles and Features in Server Manager after Windows Update
Server Manager on Windows Server 2008 or Windows Sever 2008 R2 may not be able to view Roles and Features after a Windows update. Did a Google search and chanced upon an article on Microsoft Knowledge base.
The cause of this issue is said to be due to some catalog files, manifest files or MUM files being corrupted on the computer. To resolve, you will need to download and run Microsoft Update Readiness Tool, run it, check %Systemroot%\Windows\logs\CBS\Checksur.log for corrupt information after the scan is completed, then replace corrupted package(s) that remains unfixed.
Read in details on Microsoft KB.
The cause of this issue is said to be due to some catalog files, manifest files or MUM files being corrupted on the computer. To resolve, you will need to download and run Microsoft Update Readiness Tool, run it, check %Systemroot%\Windows\logs\CBS\Checksur.log for corrupt information after the scan is completed, then replace corrupted package(s) that remains unfixed.
Read in details on Microsoft KB.
Monday, April 25, 2016
Microsoft Provides Workaround for Issues with KB3148812 WSUS Update
An important update from the Microsoft team on the KB3148812 WSUS Update.
Saturday, April 23, 2016
How to find out which w3wp.exe PID corresponds to which application pool?
Should we have more than one website hosted on IIS, it may be difficult to identify which web application is the one listed on the task manager especially when the application pools are all on Network Service.
Each w3wp.exe process has a PID (process identifier), but to tell which PID belongs to which application pool, it is not straightforward.
One method to find out the application pool is to run the appcmd command on command prompt from C:\Windows\system32\inetsrv directory.
Simply match the PID against the application pool name. I hope it helps.
![]() |
| Task Manager showing multiple w3wp.exe processes |
Each w3wp.exe process has a PID (process identifier), but to tell which PID belongs to which application pool, it is not straightforward.
One method to find out the application pool is to run the appcmd command on command prompt from C:\Windows\system32\inetsrv directory.
appcmd list wp
![]() |
| appcmd command to show application pool of a PID |
Simply match the PID against the application pool name. I hope it helps.
Tuesday, March 01, 2016
How do I enable ASP.NET 4.5 on Windows 10?
Despite you may have installed Microsoft .NET Framework 4.5 on your Windows, IIS has to be installed and ASP.NET to be enabled separately.
To install IIS, you will need to turn on Internet Information Services feature.
The next step to get ASP.NET running is to enable ASP.NET. Prior to Windows 8, we used to run aspnet_regiis /i command. Unfortunately, this command no longer works. I have tried the following command instead to get ASP.NET enabled.
To install IIS, you will need to turn on Internet Information Services feature.
The next step to get ASP.NET running is to enable ASP.NET. Prior to Windows 8, we used to run aspnet_regiis /i command. Unfortunately, this command no longer works. I have tried the following command instead to get ASP.NET enabled.
dism /online /enable-feature /all /featurename:IIS-ASPNET45
Tuesday, November 24, 2015
MsSQL: Shrink ALL Databases Using 1 Single Line of SQL Statement
Over time, the database logs on your database server may take up significant amount of disk space especially if there are many databases with lots of transactions. One quick method to free up disk space is to "shrink" your databases. Instead of shrinking one database at a time using the GUI, you can run a single line of SQL statement to do just that.
Hope it helps.
EXEC sp_MSForEachDB 'DBCC SHRINKDATABASE (''?'' , 0)'Hope it helps.
Monday, November 09, 2015
Find the Wi-Fi network password in your saved list on Windows
There may be occasion you may have a second mobile device and would like to be connected to the Wi-Fi network but sadly, you could have forgotten the password completely. What you need to do now is to run a command on the Windows command prompt in administrative mode to reveal the already added Wi-Fi network password in clear.
Replace THE_SSID with your own Wi-Fi SSID.
The below will show details of the Wi-Fi network.
To see only the password ignoring the rest of the details, feed it with the findstr command like below.
For similar hack for Mac and Linux, read How to Find the Wi-Fi Password of your Current Network.
Replace THE_SSID with your own Wi-Fi SSID.
The below will show details of the Wi-Fi network.
netsh wlan show profile name=THE_SSID key=clear
To see only the password ignoring the rest of the details, feed it with the findstr command like below.
netsh wlan show profile name=THE_SSID key=clear | findstr Key
For similar hack for Mac and Linux, read How to Find the Wi-Fi Password of your Current Network.
Thursday, October 15, 2015
FREE Computer Science and Programming eBooks Downloads
If you are looking into absolute FREE eBooks for Computer Science and Programming, you may look be able to find something interesting here.
Free Microsoft eBooks
FREE Microsoft eBooks! Microsoft Press is giving away tens and hundreds of eBooks for FREE! Start browsing and download them now!
Wednesday, September 30, 2015
Unlink Skype from Outlook.com
It is time to find a way to find out how to stop Skype from logging in automatically whenever I visits Outlook.com for the sake of just wanting to check my email. This is just so infringing my privacy!
To disable Skype from logging in automatically, you will need to unlink Skype from your Microsoft account. This is how you can do it:
I hope this helps.
» How do I unlink my Skype account from my Microsoft or Facebook account? | Skype Help
To disable Skype from logging in automatically, you will need to unlink Skype from your Microsoft account. This is how you can do it:
- Sign in to Skype.com
- Under Settings and preferences, click Account settings
- Beside your Microsoft account, click on Unlink
I hope this helps.
» How do I unlink my Skype account from my Microsoft or Facebook account? | Skype Help
Monday, September 21, 2015
Skype is down web.skype.com is still working #skypedown
Skype seems to be experiencing a global outage with desktop users, including myself, having reported unable to login. While waiting for the service to be up again, you may try to login through their web version - web.skype.com instead.
Tuesday, June 30, 2015
Rebuild all Indexes on a Microsoft SQL Server
As part of database maintenance, a DBA may wish to do periodical rebuild of all indexes. The below may come handy.
EXEC sp_MSForEachTable 'ALTER INDEX ALL ON ? REBUILD'
Wednesday, April 15, 2015
MsSQL Split Function
The following demonstrates how to do a string Split using a character delimiter.
Edited: [dbo].[Split_PerformanceEnhanced] added - better performance results (31 July 2017).
Edited: [dbo].[Split_PerformanceEnhanced] added - better performance results (31 July 2017).
--SQL function to do split (performance enhanced)
CREATE FUNCTION [dbo].[Split_PerformanceEnhanced]
(
@List NVARCHAR(MAX),
@Delimiter VARCHAR(5)
)
RETURNS @RtnValue TABLE
(
ID INT IDENTITY(1,1),
Data VARCHAR(MAX)
)
AS
BEGIN
INSERT INTO @RtnValue(Data)
SELECT [Value] FROM
(
SELECT
[Value] = LTRIM(RTRIM(SUBSTRING(@List, [Number],
CHARINDEX(@Delimiter, @List + @Delimiter COLLATE Latin1_General_100_BIN2, [Number]) - [Number])))
FROM (SELECT Number = ROW_NUMBER() OVER (ORDER BY name)
FROM sys.all_objects) AS x
WHERE Number <= LEN(@List)
AND SUBSTRING(@Delimiter + @List, [Number], LEN(@Delimiter)) = @Delimiter
) AS y
RETURN;
END
GO
--Test out the SQL function
SELECT * FROM dbo.Split_PerformanceEnhanced('one|two|three|four', '|')
GO
Below SQL function still works but prefer the above new performance enhanced version.
--SQL function to do split
CREATE FUNCTION [dbo].[Split]
(
@RowData NVARCHAR(MAX),
@SplitOn CHAR(1)
)
RETURNS @RtnValue TABLE
(
ID INT IDENTITY(1,1),
Data VARCHAR(MAX)
)
AS
BEGIN
DECLARE @count INT
SET @count = 1
WHILE (CHARINDEX(@SplitOn COLLATE Latin1_General_100_BIN2, @RowData) > 0)
BEGIN
INSERT INTO @RtnValue (data)
SELECT Data = LTRIM(RTRIM(SUBSTRING(@RowData, 1, CHARINDEX(@SplitOn COLLATE Latin1_General_100_BIN2, @RowData) - 1)))
SET @RowData = SUBSTRING(@RowData, CHARINDEX(@SplitOn COLLATE Latin1_General_100_BIN2, @RowData) + 1, LEN(@RowData))
SET @count = @count + 1
END
INSERT INTO @RtnValue (data)
SELECT Data = LTRIM(RTRIM(@RowData))
RETURN
END
GO
--Test out the SQL function
SELECT * FROM dbo.Split('one|two|three|four', '|')
GO
Monday, April 06, 2015
Subscribe to:
Posts (Atom)
Popular Posts
-
新加坡人口400万,亚洲人口4亿,全世界人口6亿。 但是,我一人可能就很有可能是世界最傻的了。我真是个不折不扣的大木头。真是受不了自己。
-
If you live in the North-East and commute early, your daily transit routine just got a whole lot sweeter. The Land Transport Authority (LTA)...
-
Google url shortener service, goo.gl , is now much improved with newly included features like easier copy and paste, and ability to delete e...
-
Let’s be honest - Singapore isn't short on places to check the haze or PSI. Between official portals and various weather apps, the data ...
-
Just yesterday, popular food blogger, Brad Lau, who owns food blog ladyironchef , who had refused to pay the full cost of his 4-persons meal...


