Get-ChildItem -Recurse -Exclude "CS1*" | Rename-Item -NewName {"CS1_" + $_.Name}

 

 

 

내가 밥벌어먹고 살고 있는 솔루션은

동기화 하고 있는 여러대의 서버가 전부 같은 날짜로 각자의 로컬 디스크에 로그를 쌓는다. 

 

평소에는 로그 볼 일이 많지 않은데

슬프게도 이 명령어를 주로 사용할 때는 장애 발생했을 때다.

 

나중에 로그를 찾을 때 이게 몇번 서버에서 나온 녀석인지 무쟈게 헷갈리기 때문에

어느 서버 출신인지 파일명에 박아두니 보기가 조금 수월해진다. 

 

반응형
#Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File C:\test\secure.dat

$DomainName = "Domain Name"
$OUpath = "OU=TargetOU,DC=TargetDC,DC=com"
$Username = "DomainJoinAccount"

$PW = Get-Content C:\test\Secure.dat
$SecurePW = ConvertTo-SecureString $PW
$Credential = New-Object System.Management.Automation.PSCredential($Username,$SecurePW)

Add-Computer -DomainName $DomainName -OUPath $OUpath -Credential $Credential

shutdown /s /t 60

Remove-Item C:\test\secure.dat
Remove-Item C:\Temp\DomainJoin.ps1

 

 

반응형
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]
"PollingIterations"=dword:00002ee0
"PollingIterationsMaximum"=dword:00002ee0
"ResendIterations"=dword:00000003
"LayerDriver JPN"="kbd101.dll"
"LayerDriver KOR"="kbd101c.dll"
"OverrideKeyboardType"=dword:00000008
"OverrideKeyboardSubtype"=dword:00000005
"OverrideKeyboardIdentifier"="kbd101c.dll"
"KeyboardFailedReset"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,\
                   00,00,00,00,\
                   03,00,00,00,\
                   72,00,38,E0,\
                   71,00,1D,E0,\
                   00,00,00,00

한영키.reg
0.00MB

 

 

 

맥에서 윈도우로 원격 접속을 많이 하다 보니 

한영 전환이 문제가 될 때가 있어

기존 한/영키를 그대로 사용하면서

Shift + Space bar 조합을 동시에 사용할 수 있는 레지스트리. 

 

 

반응형

Windows의 시작버튼을 눌렀을 때 나오는 단축키 레이아웃이 7시절에는 편집 배포가 참 편했었는데

자꾸 뭐가 늘어나서 점점 흉악하게 바뀌고 있다.

 

이제는 파일로 관리를 해야하니 원..

그나마 편하게 하는 방법은 

마스터 이미지에서 레이아웃 만든 다음 Export - Import 하는 정도...

 

https://winpeguy.wordpress.com/2015/10/30/win10-start-customization-with-layoutmodification-xml/

 

Win10: Start Customization with LayoutModification.xml

So I have made a first pass at configuring the Start (Bar? Window? Screen?).  Once thing to note is that while I made the proper configuration in my LayoutModification.xml with Internet Explorer, f…

winpeguy.wordpress.com

 

 

 

Export-StartLayout -Path C:\Windows\OSConfig\LayoutModification.xml

 

Import-StartLayout -LayoutPath C:\Windows\OSConfig\LayoutModification.xml -MountPath $env:SystemDrive\

 

Or you could just copy your LayoutModification.xml to C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml using the method of your choice.  Changes will affect new User Profiles created after making the change.

 

안타깝게도 작업표시줄은 Export가 안되는 것 같다.. https://docs.microsoft.com/en-us/windows/configuration/configure-windows-10-taskbar

 

Configure the Windows Taskbar Using Policy Settings

Learn how to configure the Windows taskbar to provide quick access to the tools and applications that users need most.

learn.microsoft.com

 

 

<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
    Version="1">
  <CustomTaskbarLayoutCollection>
    <defaultlayout:TaskbarLayout>
      <taskbar:TaskbarPinList>
        <taskbar:UWA AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
      </taskbar:TaskbarPinList>
    </defaultlayout:TaskbarLayout>
 </CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

 

이 귀찮은 xml로 App ID나 경로를 다 쳐서 꾸역꾸역 xml에 합쳐야하나보다.. -_-

일해라 MS...

반응형

http://www.nirsoft.net/utils/multiple_ping_tool.html

 

Ping to multiple host names/IP addresses on Windows 10/8/7/Vista

PingInfoView is a tool for Windows that allows you to easily ping multiple hosts (ICMP Ping or TCP Ping), and watch the result in one table.

www.nirsoft.net

 

 

세상에는 이런 천사 같은 분이 계셔서 살만하다...

 

Multi Ping 본연의 기능에 매우 충실

극도로 쉬운 사용법

자동 Export 는 살짝 찾느라 애먹었는데 Advanced Option(F9)에서 지원

 

개발자님 사랑해요

반응형
function Get-FolderSize {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
$Path
)
if ( (Test-Path $Path) -and (Get-Item $Path).PSIsContainer ) {
$Measure = Get-ChildItem $Path -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum
$Sum = '{0:N2}' -f ($Measure.Sum / 1Gb)
[PSCustomObject]@{
"Path" = $Path
"Size($Gb)" = $Sum
}
}
}

#To use the function, simply run the command with the folder path as an argument:

Get-FolderSize ('D:\')

폴더 크기 계산하는 Powershell 스크립트.

 

TreeSizeFree 같은 훨씬 편한 툴도 있지만 

외부 프로그램 반입에 민감한 사이트도 있고..

가끔은 일점검 같은 형식으로 데이터를 떨궈야 하는 사이트도 있어서

일단 인터넷 뒤져서 선구자님께서 만든 스크립트 줍줍.

 

들여쓰기를 안해뒀지만 테스트해보니 잘 돌아서 굳이 수정은 안하는 걸로...

 

http://woshub.com/powershell-get-folder-sizes/

 

PowerShell: Get Folder Size on Windows | Windows OS Hub

You can use PowerShell to calculate the exact size of a specific folder in Windows (recursively, including all subfolders). This way you can quickly find out the size of the…

woshub.com

 

 

반응형

'Computer > Windows' 카테고리의 다른 글

Windows 10 LayoutModification.xml 파일을 통한 레이아웃 설정  (0) 2025.02.05
Windows 용 Multi Ping tool  (1) 2025.02.04
Windows - IP v6 Disable Registry  (0) 2025.02.04
Windows Machine SID 조회  (0) 2025.01.24
Delete Partition  (0) 2025.01.24



ncpa.cpl에서 체크 해제로 끌 수 있기는 한데 이건 개인 사용자 용이고...

기업용 이미지 만들고 Sysprep 돌려서 SID 초기화하면 귀신같이 살아서 부활하기 때문에 

레지스트리 편집기로 부활의 씨를 말려야 한다. 

 

IP v6는 맨날 까먹는다니까..

레지스트리 편집기 - HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters

DWORD(32bit)

DisabledComponents

ffffffff(Hex)

반응형

'Computer > Windows' 카테고리의 다른 글

Windows 용 Multi Ping tool  (1) 2025.02.04
Windows Powershell - Get-FolderSize  (0) 2025.02.04
Windows Machine SID 조회  (0) 2025.01.24
Delete Partition  (0) 2025.01.24
Windows 10, Windows 11 바탕화면 아이콘 설정  (0) 2025.01.24

CMD - 

wmic UserAccount Where LocalAccount=True Get SID

 

whoami /all은 도메인 계정일 경우 의미가 없으니 유의할 것

반응형

예전에는 파티션 지울 일이 그렇게 많지 않았었는데 

갑자기 Windows 설치 후 복구 파티션이 주 파티션 뒤에 붙기 시작했다. 

 

일반 PC 환경에서는 크게 문제가 안되는데 

고객사 요구에 따라 디스크를 증설하는 경우가 꽤 있는 가상화 환경에서는 

나중에 이 부분이 문제가 되고는 한다.

디스크를 Expand 했지만 중간에 복구 영역에 막혀 같은 디스크인데도

드라이브를 따로 잡아야 하는 골때리는 상황..

그래서 고객사 협의 후 복구영역을 삭제하는 걸로 결정.

 

CMD (Run as Administrator) 

diskpart

list disk

select disk <Disk Number>

list partition

select partition <Partition Number>

delete partition override

 

반응형

https://support.microsoft.com/ko-kr/windows/windows%EC%97%90%EC%84%9C-%EB%B0%94%ED%83%95-%ED%99%94%EB%A9%B4-%EC%95%84%EC%9D%B4%EC%BD%98-%ED%91%9C%EC%8B%9C-c13270f0-3812-c71d-f27e-29aa32588b20

 

설정 - 개인설정 - 테마 - 바탕화면 아이콘 설정

 

사용자 취향에 따라 내 컴퓨터, 내 문서, 휴지통 등 아이콘 구성 선택

 

반응형

+ Recent posts