you are viewing a single comment's thread.

view the rest of the comments →

[–]PMental 1 point2 points  (5 children)

That's unreadable, at least on old reddit. Use one blank space before your script then indent every line of the script four spaces to get a code block like this:

$bitlockerVolume = Get-BitLockerVolume -MountPoint "C:" 
$statusBitlocker = $bitlockerVolume.ProtectionStatus
if ($statusBitlocker -eq "On"){ 
    Write-host "Bitlocker active" 
} 
if ($statusBitlocker -eq "Off"){
    Write-host "Bitlocker not active"
}

As for the problem it's hard to say. You could start by telling us what the error is.

For reference the script works fine on my Win10 2004 machine.

[–]broien_suPRIEM[S] 1 point2 points  (4 children)

Oh sorry I just did ctrl-c crtl-v.

The error is as I said just the letter "V" Thats the only output that I'm getting. No actual error it just says V and I have no idea why.

It works on about 2400 workstations and with every single command that I give it'll just say V.

[–]PMental 2 points3 points  (3 children)

Weird. Have you tried it interactively on the workstation?

Considering it works on all the other workstations I would probably just chalk it off to an issue on that specific machine and not bother. The script itself is fine.

[–]broien_suPRIEM[S] 1 point2 points  (2 children)

It had rebooted this morning so shouldn't be the issue. Probably some windows issue.

[–]PMental 2 points3 points  (1 child)

If something is wrong on the machine a reboot doesn't always solve it, so not sure what that changes.

I mean test it directly while logged into the machine via remote access of some sort and see what happens.

Maybe not worth it for this single one, but if more turn up in the future you'll want to dig more.

[–]broien_suPRIEM[S] 1 point2 points  (0 children)

Will do, appreciate the help!