Search found 7 matches
- Mon Jul 23, 2018 11:37 am
- Forum: PowerShell
- Topic: Remote Invoke-WebRequest gets error
- Replies: 1
- Views: 1552
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...
- Fri Jul 14, 2017 8:50 am
- Forum: PowerShell
- Topic: Out-gridview to a single variable.
- Replies: 2
- Views: 2829
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 &...
- Thu May 25, 2017 8:11 am
- Forum: PowerShell
- Topic: Trying to Array information into .csv file. I would like to put the member in a csv
- Replies: 1
- Views: 1781
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 =...
- Tue Apr 25, 2017 1:13 pm
- Forum: PowerShell
- Topic: How to have PowerShell to not truncate in the table for logon hours?
- Replies: 5
- Views: 3488
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
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
- 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: 1599
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.
- Wed Apr 19, 2017 1:44 pm
- Forum: PowerShell
- Topic: How to have PowerShell to not truncate in the table for logon hours?
- Replies: 5
- Views: 3488
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
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
- Sat Apr 15, 2017 8:42 am
- Forum: PowerShell
- Topic: How to have PowerShell to not truncate in the table for logon hours?
- Replies: 5
- Views: 3488
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...