Search found 3 matches

by sergiors
Sat Oct 12, 2019 6:59 am
Forum: Windows PowerShell
Topic: PowerSHell - MsgBox
Replies: 1
Views: 109

PowerSHell - MsgBox

Hello, I need to put a msgbox indicating if the command below was executed successfully or not $buttonGrant_Click={ #$GroupTest = $textboxCheckGroup.Text $textboxResultado.Lines = Add-ADGroupMember -Identity $textboxGroup.Text -Members $textboxLogin.Text } Example: If the command execute successfull...
by sergiors
Sat Oct 12, 2019 6:20 am
Forum: Windows PowerShell
Topic: PowerShell - Expirate the Program
Replies: 4
Views: 216

Re: PowerShell - Expirate the Program

it worked with the code below

$DTCurrent = get-date
$DTExpiry = [datetime]::ParseExact('30/11/2019','dd/MM/yyyy',$null)

if ($DTCurrent -gt $DTExpiry)
{
Write-Host "Thats all folks, $($Filename.Name) is expired"
break
}
else
{
Write-Host "Keep Running: $($Filename.Name)"
}

Thank you all
by sergiors
Tue Oct 08, 2019 3:15 pm
Forum: Windows PowerShell
Topic: PowerShell - Expirate the Program
Replies: 4
Views: 216

PowerShell - Expirate the Program

Hello I developed an application in PowerShell with windows Forms. I would like to make a condition for the executable to expire on the date I determine. I made this condition in another application that I developed in VB.NET, but I didn't find how to do it in power shell in VB it looked like this:...