Quantcast
Browsing all 21975 articles
Browse latest View live

exploring $profile makes me ask a question about Format-List

Look at this sequence of commands below and the results using powershell.exe v3. Why does adding the -force parameter to that last command make it display the NoteProperties ? And, why is the value of...

View Article


Delete "unknown" Name Servers with PowerShell

This is what I have so far...Import-Module ActiveDirectory, DnsServer$DNSserver = "server01" $zoneNamesArray = Get-DnsServerZone -ComputerName $dnsserver | select -ExpandProperty Zonename foreach...

View Article


Get-Adgroup + variable

Hi guys, i need your help. I would like to create a simple scritp to optain a groupname if it exists. I did it:Import-Module ActiveDirectory  $today = Get-Date -f dd.MM.yyyy_ore_HH_mm  $srvname =...

View Article

Output File and Preserve Formatting

I have a script which outputs a text file based on a series of variables -  the header, the content of a powershell script, some additional code and then a footer at the bottom all concatenated...

View Article

Is there a comprehensive book or tutorial on working with Excel using...

Is there a book or tutorial on working with Excel objects using PowerShell ?I see all sorts of fragmented subject matter articles and book chapters on using PowerShell code to edit or run Excel...

View Article


PowerShell script to produce a disk usage report like the UNIX du program ?

I need a PowerShell script to produce a disk usage report like the UNIX du program.There was one in an earlier thread (see below), but it is pretty...

View Article

Invoke-Command RDS, deployment does not exist

Hello, I am trying to invoke simple commands(like get-rdusersession) on RDS server from another server in domain. But I always get an error that the deployment does not exist on that server. Which is...

View Article

Where to put -ChangePasswordAtLogon switch?

Hello gentleman.I have been snooping around it the script below, i am trying to figure out where to put the -ChangePasswordAtLogon switch so the newly created users must change passsword at first...

View Article


How to expire an AD account 30 days from 1st login

How can I expire or disable an AD account 30 days from 1st login?Jason

View Article


Power Shell Script

Hi,i need powershell script to get the users list from Active directory of not login at last 7 days ..any one can help me to get this information from AD..Regards,Dhinesh PTechnical Administrator

View Article

How to Parse email address

Hello,I have a Powershell Script that reads information from a SharePoint List and sends out emails to the Assigned To (people picker).The issue I am having is the email address is returned from the...

View Article

Overwrite last three lines of text file

Is there a way to overwrite the last few lines of a text file? I'm trying to append some text to a text file but either trim the last three lines or preferably overwrite the existing last three.Thanks...

View Article

how to test remote ipconfig /flushdns script

Hi, i think my script is good just not sure if its actually working since there are no logs in the event viewer for flushdns command, any ideas?"Ipconfig /flushdns script is running.." #$servers =...

View Article


Write-Zip Problems

Hi,Maybe this is not possible with Write-Zip ; hopefully I'm wrong.I have a collection of folders, each of which may contain a hundred or more child folders and files.I simply wish to use Powershell to...

View Article

where are docs for VirtualMachine object

Where is the documentation for the Microsoft.HyperV.PowerShell.VirtualMachine object? (The "Get-VM" cmdlet returns these objects.) Maybe I'm blind but I can't find documentation for the properties for...

View Article


How to find User Logon Name by User Display Name

I have user's display name and need to find user's logon name or logon Id in a domain by Powershell v2 ?

View Article

PS script to disable users / Audit and remove Groups / Hide from GAL have...

Hi AllI am trying to get a script together to run against a specific OU (our disabled Users OU) to make the process of leavers more automated.I am trying to achieve the 4 main outcomes below1. Disable...

View Article


Export-Clixml Performance Issues

I have a data collection script that pulls information from multiple data sources (mainly from AD) and builds arrays of custom PSObjects.  Once I have the information stored in variables, I like to use...

View Article

Move folders on a remote computer

HiI need to move a list of folders (all from the same path) into a single folder on a W2K3 server.I was thinking of using PS from W2K8 server.Is there a way of doing this using PS?MaelitoMaelito

View Article

SQL query error when trying to fill dataset.

I keep getting an error when trying to run this SQL query in powershell. I'm guessing it's having a problem converting the dates it pulling into strings. Can someone help me please.  Exception calling...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>