Removed mklink for git

This commit is contained in:
2024-11-06 12:39:13 -07:00
parent a6071a4073
commit 11bb8c848c
263 changed files with 19951 additions and 1508 deletions

View File

@ -1,8 +1,8 @@
---
type: "topic"
assigned: ""
created: "2024-02-25T00:52:01.394Z"
updated: "2024-03-21T16:42:43.661Z"
assigned: ''
created: 2024-02-25T00:52:01.394Z
type: topic
updated: 2024-10-10T19:30:28.672Z
---
# PowerShell
@ -23,7 +23,9 @@ Clear-History
[Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory()
```
```VSCode Find & Replace
## VSCode Find & Replace
```
cls\n & 'c:\\Users\\phares\\.vscode.*\n
dotnettools.csharp-.*\n
```
@ -117,6 +119,8 @@ C:\Program Files (x86)\Windows Kits\10
C:\Program Files (x86)\WindowsPowerShell\Modules\Pester\3.4.0
```
## AD
```PowerShell
Add-WindowsFeature AD-Domain-Services
Get-ADUser -Filter * -Properties ScriptPath | Group-Object ScriptPath | Select-Object Count,Name
@ -129,6 +133,8 @@ Get-ADGroup -Filter "Name -eq 'EC-MES-PRJ-SPC-SI-R-L'" -Properties members
Get-ADGroupMember -Identity MES-APP-OpenInsight-Users | Select-Object name, objectClass,distinguishedName | export-csv D:\Tmp\admingroup.csv
```
## PowerShell Modules
```PowerShell
Save-Module -Name PSWindowsUpdate -Path "D:\Downloads\2023" -Repository PSGallery
mkdir "C:\Test\Modules\PowerShellGet\"
@ -145,6 +151,8 @@ Install-WindowsUpdate AcceptAll IgnoreReboot
"C:/Windows/System32/WindowsPowerShell/v1.0/Modules"
```
## WSL
```PowerShell
$wslFile="$env:temp\wsl-vpnkit.tar.gz"
curl.exe --output "$wslFile" "https://artifactory.intra.infineon.com/artifactory/gen-it-pfw-files-local/WSL2-defaults/wsl-vpnkit-0.3.8.tar.gz"
@ -154,6 +162,8 @@ wsl --import "wsl-vpnkit" "$wslDir" "$wslFile"
Remove-Item "$wslFile"
```
## winget
```PowerShell
winget install vscodium
winget install git.git
@ -162,15 +172,21 @@ winget install winscp.winscp
winget install DominikReichl.KeePass
```
## unblock
```PowerShell
unblock-File -path "C:\Users\phares\AppData\Local\IFXApps\RDCMan\2.93.1431.0\RDCMan.exe"
```
## whoami
```PowerShell
whoami
whoami /groups
```
## Command from PowerShell
```PowerShell
cmd /C mklink /D C:\local\path \\UNC\path\folder
```
@ -190,3 +206,11 @@ $ps = Start-Process -PassThru -FilePath powershell -Credential $credentials -Arg
$ps.WaitForExit()
```
## How do I delete a Windows file with a trailing space, (or period), character?
- [how-do-i-delete-a-windows-file-with-a-trailing-space-or-period-character](https://stackoverflow.com/questions/67884051/how-do-i-delete-a-windows-file-with-a-trailing-space-or-period-character)
```PowerShell
Remove-Item -LiteralPath "\\?\L:\DevOps\Mesa_FI\File-Folder-Helper\.vscode\helper\tfs\_\Epic-109727-eCert @ LEO "
```