!HELP! prompt for domain admin credentials

A

Alex

Guest
Alex Asks: !HELP! prompt for domain admin credentials
The idea is when someone runs the script it prompt for admin credentials they enter their domain admin credentials so they may find a bitlocker key which requires Domain admin credentials to find.

The script prompts for credentials if not already running as admin but when entering the domain admin credentials the script doesn't see them (but no error) and ends up giving me a blank bitlock key result.

When opening PowerShell as different a user; using domain admin credentials.

Navigating the script and running; I get get the bitlocker key.

I think the script is asking for local admin credentials even tho I inputted my domain credentials and it goes through but I receive a blank bitlocker key result.

Any help?

This tool is meant to be a utility for other techs attempting to make it user friendly with this cmdlet.

Thank you so much in advance.

The Following script:

Code:
    If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
    
    [Security.Principal.WindowsBuiltInRole] “Administrator”)){
    
    $A=Read-Host -Prompt "Enter A account"
    
    $pwd=Read-Host -AsSecureString -Prompt "Enter password Domain\$A"
    
    ConvertTo-SecureString -AsPlainText $pwd -Force
    
    $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ('Domain\$A'), $pwd
    
    }
    
    do{
    
    Write-Host "Find the bitlocker key AD" -ForegroundColor Green
    
    $CN= Read-Host -Prompt 'Enter Computer Name'
    
    
    
    $AD= Get-ADComputer $CN
    
    $bitlocker= Get-ADObject -Filter 'objectClass -eq "msFVE-RecoveryInformation"' -SearchBase $AD.DistinguishedName
-Properties whenCreated, msFVE-RecoveryPassword | `
    
    Select msFVE-RecoveryPassword | out-string
    
    
    
    "$bitlocker"
    
    
    
    $message = Read-Host "Repeat(Y or N)?"
    
    }
    
    #Repeat script if "Y" is selected. Ends script if any other charater is used.
    
    while ($message -eq "Y")

I also tried replacing the prompt with the following and same results:

Code:
# Specify credential details
$domain = 'domain'
$userName = Read-Host -Prompt "Enter A account"
$password = Read-Host -AsSecureString -Prompt "Enter password $Username" 

try {
    # Create a credential object
    $netCred = New-Object -TypeName System.Net.NetworkCredential -ArgumentList $userName, $password

    # Create an LdapConnection object
    $connection = New-Object -TypeName  System.DirectoryServices.Protocols.LdapConnection -Argumentlist $domain
    $connection.Credential = $netCred

    # Attempt to connect
    # Will raise an exception if credentials are wrong, DC is unavailable, etc
    $connection.Bind()

    # Do something with the valid credentials
    do{
Write-Host "Find the bitlocker key AD" -ForegroundColor Green
$CN= Read-Host -Prompt 'Enter Computer Name'



$AD= Get-ADComputer $CN 

 
$bitlocker= Get-ADObject -Filter 'objectClass -eq "msFVE-RecoveryInformation"' -SearchBase $AD.DistinguishedName -Properties whenCreated, msFVE-RecoveryPassword  | `
Select msFVE-RecoveryPassword | out-string

"$bitlocker"



$message = Read-Host "Repeat(Y or N)?"
}
#Repeat script if "Y" is selected. Ends script if any other charater is used.
while ($message -eq "Y")

}
catch [System.DirectoryServices.Protocols.LdapException] {
    # Failed to connect, so give the user a friendly error message
    Write-Output -InputObject "Error connecting to the '$domain' as '$userName': $($_.Exception.Message)"
}
finally {
    # Dispose of the connection
    $connection.Dispose()
}

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
 

Unreplied Threads

Continuous morphism in function fields with extra conditions

joaopa Asks: Continuous morphism in function fields with extra conditions
Let $\Omega$ be the completion of $\overline{\mathbb F_q\left(\left(\frac1T\right)\right)}$ for the topology induced by the valuation $-\deg$ on $\mathbb F_q\left(\left(\frac1T\right)\right)$. Consider $s$ distinct non zero elements $\alpha_1,\cdots,\alpha_s$ of $\overline{\mathbb F_q(T)}$. One assumes that $\deg(\alpha_1)\le\cdots\le\deg(\alpha_s)$. Does there exist a non zero morphism $\sigma$ of $\Omega$ such that $\sigma\left(\overline{\mathbb F_q(T)}\right)\subset\overline{\mathbb F_q(T)}$ and $\deg(\sigma(\alpha_i))<\deg(\sigma(\alpha_{i+1}))$ for any $i\in[1,s-1]$

Be careful for the sign. In the third line, it is $\le$ and the fourth one $<$.

Thanks in advance for any answer.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Modifying a matrix equation

C.Koca Asks: Modifying a matrix equation
I have a matrix equation of the form

$$ Q=SBS+SBA+HSBZ+ABS+ABA+ABZ+ZBS+ZBA+ZBZ. $$

If it weren't for the $H$ matrix in the third term, the whole thing would be

$$ Q^\prime=(S+A+Z)B(S+A+Z). $$

As it is, I was able to reduce it to

$$ Q=(S+A+Z)B(S+A+Z)+(H-I)SBZ, $$ but I want to eliminate the addition, if possible. In other words, I am looking for an expression like

$$ Q=f(S,A,H,Z)Bg(S,A,H,Z), $$ where $f(.)$ and $g(.)$ are matrix functions.

All matrices are square and real. $S$ is symmetric and $H$ is a diagonal, i.e., they commute.

I am looking for some $f(.)$ and $g(.)$. I will be calculating $$ Q^{(n)}=f^n(S,A,H,Z) B g^n(S,A,H,Z), $$ and I will be using SVD to proceed. Thus eliminating the addition helps me a lot.

Thanks!

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Invert transform of a generating function

Seth Asks: Invert transform of a generating function
A055887's generating function is given as a transform of another generating function $\frac{1}{1-P(x)}$. It's clear from the definition that this is $\sum_{n=0}^{\infty} \left [ \sum_{i+j+k+...=n} P(i)P(j)P(k)... \right ] x^n$ but I'm struggling to derive this.

I've seen $x$ in $\frac{1}{1-x} = 1+x+x^2+x^3$ be replaced $x$ with $a x$, $x^2$, $x^m$, $-x$ but I only proved these by working backwards. Starting with the result and showing $S - Sx = 1$ then concluding $S = \frac{1}{1-x}$.

This was called "invert transform" in A067687 but that term doesn't seem to be defined or commonly used outside of OEIS.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Shouldn’t vacuous truths be false since they imply false information?

copepod Asks: Shouldn’t vacuous truths be false since they imply false information?
Example: “All the lions I own are healthy”.

In real-world situations, such as court hearings, this sentence will be regarded as a lie if I don’t actually have any lions. Makes sense: what i really say is “I have lions and they’re all healthy”. It’s false, and because it’s synonymous with the original, the original is also false. Logic does agree that the rewording is false, but it doesn’t view it as a synonym with the original, which it treats as a vacuous truth. Why?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Mathematically prove that a Beta prior distribution is conjugate to a Geometric likelihood function

Shivam Dave Asks: Mathematically prove that a Beta prior distribution is conjugate to a Geometric likelihood function
I have to prove with a simple example and a plot how prior beta distribution is conjugate to the geometric likelihood function. I know the basic definition as

'In Bayesian probability theory, a class of distribution of prior distribution $\theta$ is said to be the conjugate to a class of likelihood function $f(x|\theta)$ if the resulting posterior distribution is of the same class as of $f(\theta)$.'

But I don't know how to prove it mathematically.

P.S. - It would really nice of you guys to provide some good material on bayesian statistic and probability theory.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Maximal compact subgroup of $GL_n(\mathbb C_p)$

boxdot Asks: Maximal compact subgroup of $GL_n(\mathbb C_p)$
It is known that the general linear group $GL_n(\mathbb Q_p)$ over the $p$-adic numbers has $GL_n(\mathbb Z_p)$ as a maximal compact subgroup and every other maximal compact subgroup of $GL_n(\mathbb Q_p)$ is conjugated to this one. (Unfortunately, I don't have any reference for this fact and so I don't know any proof.)

Q: Is this also true for $GL_n(\mathbb C_p)$ and $GL_n(\mathcal O)$, where $\mathcal O \subset \mathbb C_p$ is the integer ring?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

Value of Product Based on Bitcoins

  • Chuck
  • Finance
  • Replies: 0
Chuck Asks: Value of Product Based on Bitcoins
If I chose to accept Bitcoin as a payment for my product, and the price of the bitcoin goes up or down, then technically I am not getting as much for my product in the long run correct? Because the exchange is based on the dollar as one of the currencies. So If my product cost's 100.00 and that is a certain percentage of a bitcoin then if the bitcoin say its worth 7100.00 that would be .014 bitcoins. But if the bitcoin decreased in price say to 5100.00 then that same product would cost .019 bitcoins. Correct? How dos the fluctuation in price affect the value of my product in dollars?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.