I'm thinking of getting event logs with Powershell.
If i try to get the event log with the following PowerShell command, access will be denied if"(double quotation) exists in the password.
If the password has "(double quotes), how can I register it in a variable with powershell and execute it?
Host name: TestServer
Connected user: TestUser
wevtutil qe Security/r: TestServer/u: TestUser/p: $LOGIN_PASS/f: XML/c: 10>TEST.xml
If i change the server password to "TEST01" and execute it after editing to assign "TEST01" to the variable ($LOGIN_PASS), you can get the event log without any problem.
Answer # 1
"TEST01 \ `""
It worked without problems if escaped.
- windows - i want to get a command result file in powershell (in english)
- powershell - when you execute the command that outputs a file from ansible to the target node, the characters are garbled
- i don't know how to use powershell command where-object simple notation
- powershell - sort csv (tsv) files on windows command line
- powershell - i want to extract part of the systeminfo command from aws windows server
- powershell command execution
- PowerShell Command Operations Collection (Summary)
- Detailed use of the match command in PowerShell
- Windows Powershell command returns an array
- What is the relationship between PowerShell and Cmd command line for PowerShell introductory tutorial?
- Method for calling Cmd command and PowerShell command from PowerShell introductory tutorial
- PowerShell use Remove-Item command to delete files, registry entries
- Example of using Test-Path command in PowerShell to check if a file or folder path exists
- How does a PowerShell command include spaces?
- PowerShell restart service command Restart-Service
- Use Get-ChildItem command to read directories and file lists in PowerShell
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved