Search found 7 matches

by cgjackson@yahoo.com
Mon Jul 23, 2018 11:37 am
Forum: Windows PowerShell
Topic: Remote Invoke-WebRequest gets error
Replies: 1
Views: 261

Remote Invoke-WebRequest gets error

The script works on the remote box and with browser from the box I am remoting from. The code is: (Invoke-WebRequest https://xxxxxxxxx/$DateFrom).Content Error is: ERROR: The remote server returned an error: (404) Not Found. ERROR: + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWe...
by cgjackson@yahoo.com
Fri Jul 14, 2017 8:50 am
Forum: Windows PowerShell
Topic: Out-gridview to a single variable.
Replies: 2
Views: 1269

Out-gridview to a single variable.

I trying to get out this code to a variable. I get the pop-up screen, but don't see how to get it to a variable. Import-Csv "d:\files\divcode.csv" | select-object -property * | out-gridview -OutputMode Single -Title 'Select a row' | ForEach-Object { $DevCode = $_DivisionCode } Write-host "$DevCode" ...
by cgjackson@yahoo.com
Thu May 25, 2017 8:11 am
Forum: Windows PowerShell
Topic: Trying to Array information into .csv file. I would like to put the member in a csv
Replies: 1
Views: 1054

Trying to Array information into .csv file. I would like to put the member in a csv

##Powershell Test ## parameter declarations param ( [string]$DateFrom = $( Read-Host "Input Last Date Updated, format YYYY-MM-DD" ), [string]$DateTo = $( Read-Host "Input Date to Update To (Leave blank for today), format YYYY-MM-DD" ) ) $DateTo = "_$DateTo"; $matches = @() ## WebRequest Section. De...
by cgjackson@yahoo.com
Tue Apr 25, 2017 1:13 pm
Forum: Windows PowerShell
Topic: How to have PowerShell to not truncate in the table for logon hours?
Replies: 5
Views: 1687

Re: How to have PowerShell to not truncate in the table for logon hours?

Get-ADUser -Identity $name -Credential $cred -Server $DC8 -Property *| Select -expand logonhours | %{$_ -join ','}
That gives me the same results.
After set MCADDNSTNA01
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
by cgjackson@yahoo.com
Wed Apr 19, 2017 1:50 pm
Forum: PowerShell Studio
Topic: Getting Get-Aduser to show up as a known powershell command.
Replies: 1
Views: 657

Getting Get-Aduser to show up as a known powershell command.

I have loaded the Windows AD module. Is there a way for the AD commands to show up as powershell commands. You get unkown when you hover over Get-ADUser.
by cgjackson@yahoo.com
Wed Apr 19, 2017 1:44 pm
Forum: Windows PowerShell
Topic: How to have PowerShell to not truncate in the table for logon hours?
Replies: 5
Views: 1687

Re: How to have PowerShell to not truncate in the table for logon hours?

Thanks. That does it. Is there any way to make it not put one at a time.
Is there way to display 0 0 0 0 or whatever the return is thanks again.
Here is the output:
After set MCADDNSTDC03
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
by cgjackson@yahoo.com
Sat Apr 15, 2017 8:42 am
Forum: Windows PowerShell
Topic: How to have PowerShell to not truncate in the table for logon hours?
Replies: 5
Views: 1687

How to have PowerShell to not truncate in the table for logon hours?

I have tried several different ways, but it truncates the table: $User = Get-ADUser -Identity $name -Server $DC1 -Properties SamAccountName,LogonHours $User.LogonHours (Get-ADUser -Identity $name -Server $DC1 -Properties SamAccountName,LogonHours).LogonHours Get-Aduser -Identity $name -Property * -S...