[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology


View post   

[ Toggle deleted replies ]
>> No.62311460 [View]
File: 12 KB, 391x256, IC816884.png [View same] [iqdb] [saucenao] [google] [report]

Just learn pic related and you'll be fine.

>> No.61027446 [View]
File: 12 KB, 391x256, pshh.png [View same] [iqdb] [saucenao] [google] [report]

>Not using Powershell
Then again, you use Linux so you basically know nothing about computers.

>> No.59559657 [View]
File: 12 KB, 391x256, IC816884.png [View same] [iqdb] [saucenao] [google] [report]

Sup /g/, I need some help with a very basic powershell script.

I need to trim a string to make something more "pretty" for a coworker.

Right now my script is...
$Server = Read-Host -Prompt 'Enter IP'
$Results = Get-WmiObject -Class Win32_Desktop -ComputerName $Server | select-string -pattern "Name"

and the output of this looks like...
\\HOSTNAME\root\cimv2:Win32_Desktop.Name="NT AUTHORITY\\SYSTEM"
\\HOSTNAME\root\cimv2:Win32_Desktop.Name="NT AUTHORITY\\LOCAL SERVICE"
\\HOSTNAME\root\cimv2:Win32_Desktop.Name="NT AUTHORITY\\NETWORK SERVICE"

I'd like the output to only be the part between the quotes, any suggestions?

>> No.59483292 [View]
File: 12 KB, 391x256, powershell.png [View same] [iqdb] [saucenao] [google] [report]

PowerShell is not very discussed on /g/ for some reason, although it has it's merits in the Windows World

Do you use it?
What is your opinion on it?
Any cool scripts that you can share?

>> No.57713641 [View]
File: 12 KB, 391x256, IC816884.png [View same] [iqdb] [saucenao] [google] [report]

View posts [+24] [+48] [+96]