Split filename and create folders with Powershell script ( --newbie user)

I have a folder with 1000's of files. Each file varies in length; typically between 9-14 characters. Example:
C:\workpics\1238955678.1
C:\workpics\744556224.1
C:\workpics\744556224.2
C:\workpics\8445655996.1
I would like to run a script to split the filename and separate into folders. The filename would then consist of 5 characters, the foldername would be the first characters remaining.
C:\workpics\12389\55678.1
C:\workpics\7445\56224.1
C:\workpics\7445\56224.2
C:\workpics\84456\55996.1
Any assistance to create this Powershell script would be awesome. Thank you!!

I have a folder with 1000's of files. Each file varies in length; typically between 9-14 characters. Example:
C:\workpics\1238955678.1
C:\workpics\744556224.1
C:\workpics\744556224.2
C:\workpics\8445655996.1
I would like to run a script to split the filename and separate into folders. The filename would then consist of 5 characters, the foldername would be the first characters remaining.
C:\workpics\12389\55678.1
C:\workpics\7445\56224.1
C:\workpics\7445\56224.2
C:\workpics\84456\55996.1
Any assistance to create this Powershell script would be awesome. Thank you!!
Please reread your request.  It makes no sense.  Read each statement carefully and notice that the statements are in conflict.
Start your scrip in PowerShell.  Look up things like how to list files and how to manage strings.  All of the information you need is here:
http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
¯\_(ツ)_/¯

Similar Messages

  • Managing and distributing Folders with folder actions to a group of users?

    I want to set up a server for a camera club on a SnowLeo Server running on a MacMini. We want to collect images every month from users who want to participate in a club competition and are looking into the FileSharing service on the server to collect the images.
    My initial idea was to find a way of letting the Administrator automatically create folders with folder actions in every users home folder (i.e. "2010-April-Portraits"). After the user had uploaded images into it, the folder action would then rename, reformat and transport images into a central location to be processed further.
    Is this a good way of collecting data, and if yes - how do I let the Admin create and distribute these folders with the appropriate actions?
    Best regards,
    Kjell Are Refsvik
    Norway

    Hi,
    I want to purchase a Macmini with SL Server and create a photo competition solution for a camera club. The solution needs to be able to accept uploaded images and the solution needs to let the user associate a set of images to a competition and from there the solution needs to make sure that the filename, format, size and embedded metadata is correct before storing and processing them further. Friends I have talked to say I need a classic CMS solution so I may need to investigate instead of my planned AppleScript/Automator solution.
    Also - thank you for offering to develop, but I had kinda planned to do this myself to build some knowledge and also get to know the server better.
    Anyone else using the SnowLeo server for a solution like this?
    Kjell Are Refsvik
    Norway

  • Just days ago, I downloaded and created folders for two batches of photos and now they are missing. They were not deleted by anyone, and even if they were, they were not found in my trash can. What happened? They were erased from my camera, so I am upset.

    Just days ago, I downloaded and created folders for 2 batches of photos I downloaded from my camera to iphotos but now both are missing.  They were not deleted and even if they were, were not found in my trashcan. I have looked through every folder and they are not there. Is there a bug that can get into iPhoto to do this? Is there a program Apple offers to retrieve lost photos? Thank you.

    debbie5891 wrote: ... They were not deleted and even if they were, were not found in my trashcan...
    How do you know they were not deleted? Is it possible that they were moved to the trash and the trash has been emptied, if not by you, perhaps by someone else?
    In the best case, you mean they were not deleted from your camera.  If so, it will be simple to merely download again from your camera after you have corrected any problem with your Mac or workflow.
    If you have a way to be certain that your two folders were not deleted from your Mac,  follow the directions provided by your Mac's Disk Utility to repair your Disk (not Disk Permissions.)  On more than one occasion, disk repair has restored the visibility of missing folders I knew I had not deleted.  If you have trouble with the process, post back which specific Mac OS version ( > About This Mac) you are using so we can offer specific help.
    It is also possible that the missing folders might be saved somewhere you do not expect them to be.
    It is also possible that they may merely be invisible and, thus, not showing in your Finder windows even after performing a Disk Repair.
    Here are some more ideas you can consider:
    Restart Mac and then look where you expect the folders to be.  They may be visible there now.
    If not, try a Spotlight search for the folder name(s) you used.  Spotlight may give you a list of places to look.  If you don't remember the folder name(s), try a search for the file type your camera uses for saved images.  My cameras save "jpg" files, but yours may save other image file types. 
    You can also open a finder window and use the window's search oval to search.  The method allows you to use the search "+" button to add invisible items via the "File Visibility"  choice.
    debbie5891 wrote:... I have looked through every folder and they are not there....
    If you are using any version of Mac OS X, I doubt this statement can be true.
    If you select your disk volume name (not the Media item) in the sidebar of your Mac's Disk Utility, you will see that the number of Folders and files on your disk is very large.  For example,I keep my startup disk small and write most of my files to other disks.  Even so, my startup disk contains more than 195,000 folders.
    If you mean you used some software to search each folder, please post back the name of the app you are using.
    debbie5891 wrote: ... Is there a bug that can get into iPhoto to do this? ...
    I have not had the problem you describe, nor have I heard of such an iPhoto Bug.
    I have used every version of iPhoto I have seen including the current new version: iPhoto '11 version 9.5 (902.7).  You can find the version you are using by executing the iPhoto > About iPhoto menu command and post it back here.
    debbie5891 wrote:... Is there a program Apple offers to retrieve lost photos? ...
    I am not aware of any Apple apps that work specifically on photo files.  If you know the pathname to the lost files, and if you are comfortable with Unix commands, you might be able to use your Mac's Terminal utility to retrieve at least some of your images.  However, it will be MUCH simpler to merely download another copy from your camera.
    You can search the Mac App Store for "unerase" to find several apps that can unerase files, including deleted photo files, in certain circumstances even after the trash has been emptied.  To determine whether one or more of them may meet your needs, see their product info and reviews for specifics about each one.
    debbie5891 wrote:...Thank you.
    You're most welcome.
    If you need to post back for more information, please provide specifics on your Mac OS, iPhoto version, which of the suggestions offered here you have tried, and any details not already provided about the problem status.
    Message was edited by: EZ Jim
    Mac OSX 10.9

  • Netstorage WebDav - Can only see and create folders

    Hello,
    I am attempting to map a Netstorage drive using WebDav from Windows 7 32bit or 64bit or Windows 8.1 64 bit. I have read other posts where people have had problems, but I think my problem is a bit different. After mapping the drive, I am only able to see folders and create folders. Creating other files results in error 65535. Copying files to a folder, from by harddrive, results in "Can't read file from the source file or disk".
    I have another customer, with almost the same setup. Both Netstorage v. 2.0, same Apache version aswell. And it works in their environment.
    If I log in via the webinterface, everything works file. It is only when I map it in Windows. Some say this is a bug in Windows and I have installed all the updates Microsoft has released regarding WebDav. Again, it works in one environment, but no the other.
    It looks like rights of the user, but since it does work over the webinterface, it can't be.
    Any ideas?
    Thanks in advance,
    Jacob.

    You should submit your suggestion here:
    http://discussions.apple.com/ann.jspa?annID=384

  • I have a new email address. Changed this on my itunes account. On iPhone deleted old icloud account and created new with new email. I have set find my phone to on. When I download music it no longer goes to icloud an does not show up on my iphone.

    I have a new email address. Changed this on my itunes account. On iPhone deleted old icloud account and created new with new email. I have set find my phone to on. When I download music from itunes it no longer goes to icloud an does not show up on my iphone.

    I have the same problem - it is maddening. I rely on this iPad for work so this is not just an annoyance! The above solutions of changing the appleid on the device or on the website do not work.
    The old email address no longer exists - I haven't used it in a year probably and I no longer have the account.  I logged into the appleid website and there is no trace of the old email address so there is nothing that can be deleted or changed there.  On the iPad there is no trace of the old email address so nothing can be deleted there either. I have updated the iPad software and the same problem comes right back.  Every 2 seconds I am asked to log in using the old non-existent email.  The device is currently useless.
    The only recent change to anything was the addition of an Apple TV device, which was set up using the correct login and password.
    Does anyone have any ideas? The iPad has been backed up to the iCloud so presumably it now won't recognize the current iCloud account? So restoring may notbe an option?

  • Outlook remove empty pst folders from stores with powershell script

    I created a script that finds all pst folders in the My Documents folder of a user, moves those PST files and attaches the PST to outlook after they've been moved.
    If PSTs in a user's my documents folder was attached to Outlook before the script is run. after the script runs successfully in the outlook profile those PSTs would have two entries in the stores, an old reference that is because the PSTs have been moved
    those folders can no longer be opened in outlook and each time a user attempts to open the folder it prompts you to browse for the new location of the PST. Then the new entries in the stores which were added via the script.
    I want to add removing those empty folders or rather those folders with broken file paths from outlook to my script. Because of these broken folders i can't enumerate through the list of attached folders in outlook, the script errors outlook.
    I need help scripting (PowerShell) the task of removing broken folders from the outlook stores
    thanks

    Here is a sample of the kind of code you need to work with:
    $ol=New-Object -ComObject Outlook.Application
    $ns=$ol.GetNamespace('MAPI')
    foreach($store in $ns.Stores){
    if($store.IsDatFileStore){$ns.RemoveStores($store)}
    # use $ns.AddStore() to reattache a store.
    # inbox dor account must be retrieved and maintained.
    If you are not sure how to proceed then post in the Outlook Developer forum.  They should have many examples of how to move PSTs given different versions and scenarios.
    You can also find many examples here:
    http://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=Office&f%5B0%5D.Text=Office&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=Microsoft%20Outlook&f%5B1%5D.Text=Microsoft%20Outlook
    ¯\_(ツ)_/¯

  • Looking for help with PowerShell script to delete folders in a Document Library

    I'd like to create a PowerShell script to delete old folders in a Document library that are over 30 days old. Has anyone created something like this?
    Orange County District Attorney

    Hello Sid:
    I am trying to do the same and Iam running the script to delete the subfolders inside a folder  but I have some errors. 
    Could you please take a look?
    _______Script________
    $web = Get-SPWeb -Identity https://myportal.mydomain.com
    $list = $web.GetList("ar_mailingactivity")
    $query =  New-Object Microsoft.SharePoint.SPQuery 
    $camlQuery = '<Where><And><Eq><FieldRef Name="ContentType" /><Value Type="Computed">Folder</Value></Eq><Leq><FieldRef Name="Created" /><Value Type="DateTime"><Today OffsetDays="-30" /></Value></Leq></And></Where>'
    $query.Query = $camlQuery
    $items = $list.GetItems($query)
    for ($intIndex = $items.Count - 1; $intIndex -gt -1; $intIndex--)
       $items.Delete($intIndex);
    ________Errors_______
    Unable to index into an object of type System.Management.Automation.PSMethod.
    At C:\Script.ps1:2 char:22
    + $list =$webGetList <<<< "ar_mailingactivity"]
    + CategoryInfo
    :InvalidOperation: (ar_mailingactivity:String) [], RuntimeException
    + FullyQualifiedErrorID
    :CannotIndex
    You cannot call a method on  a null-valued expression.
    At c:\Script.ps1:6 char:24
    + $items = $list.GetItems <<<< ($query)
    + CategoryInfo
    :InvalidOperation: (GetItems:String) [], RuntimeException
    + FullyQualifiedErrorID
    :InvokeMethodOnNull

  • Update a filed value with powershell script with ordery by and where condition

    Hi
    I have below powershell script to update list columns but  how i update a field value with ordery by a column and where condition
    below is the part of my script
    $list = $web.Lists[$listName]
    $items = $list.items
    $internal_counter = 1
    #Go through all items
    foreach($item in $items)
    if($item["CourtNO"] -eq $null)
    #if($item["CourtNo"] -eq '1')
    $item["CaseNo"] = $internal_counter
    #how to add a column ordery by Title
    # and where Title field value from 1 to 10
    $internal_counter++
    adil

    Hi,
    You mean that you only need to update all items with Title field value in range 1..10 and order by them before run the loop statement update?
    If so, use CAML query to get the items only match the condition.
    #Build Query
    $spQuery = New-Object Microsoft.SharePoint.SPQuery
    $query = '<Where><And><Gte><FieldRef Name="Title" /><Value Type="Text">0</Value></Gte><Lte><FieldRef Name="Title" /><Value Type="Text">10</Value></Lte></And></Where><OrderBy><FieldRef
    Name="Title"/></OrderBy>'
    $spQuery.Query = $query
    $spQuery.RowLimit = $list.ItemCount
    $items = $list.GetItems($spQuery)
    Hope this help!
    /Hai
    Visit my blog: My Blog | Visit my forum:
    SharePoint Community for Vietnamese |
    Bamboo Solution Corporation

  • How to Read the "text file and csv file" through powershell Scripts

    Hi All
    i need to add a multiple users in a particular Group through powershell Script how to read the text and CSV files in powershell
    am completly new to Powershell scripts any one pls respond ASAP.with step by step process pls
    Regards:
    Rajeshreddy.k

    Hi Rajeshreddy.k,
    To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
    To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
    $Users = Get-Content -Path 'C:\ListOfUsernames.txt'
    $Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
    Add-ADGroupMember -Identity $Group -Members $Users

  • Bridge copy and paste folders with the same name question

    I just copied and pasted a folder named, as an example, "concerts" with a bunch of pictures to another drive with a folder with the same name.
    I choosed "substitute" when prompted and all the pics existing in old "concerts" folder have been deleted and replaced with just the new ones.
    So pasting a folder can't add files to the folder with the same name, but it completely replaces it. The other prompted option creates a "concerts (1)" new folder.
    Luckyly before moving files I always do a backup, so it's not a big issue, but I'm amazed by such behaviour. Also deleted pictures don't appear in the recycle bin. They are completely lost!

    I choosed "substitute" when prompted and all the pics existing in old "concerts" folder have been deleted and replaced with just the new ones.
    Are you on Windows? don't know the options you tell, I have three options (Mac) called: 'cancel', 'replace' and 'auto resolve' when dealing with one file and for multiple files it adds 'skip' to the list and has the option for 'apply all'
    Replace does what it says, it replaces files and folders with the same name, auto resolve adds a (1) to the files or other number if more with same name are added.
    So pasting a folder can't add files to the folder with the same name, but it completely replaces it. The other prompted option creates a "concerts (1)" new folder.
    This is normal and wished behavior, you get a warning if names are the same and a choice to either overwrite them or add them with a new (different) filename.
    Luckyly before moving files I always do a backup, so it's not a big issue, but I'm amazed by such behaviour. Also deleted pictures don't appear in the recycle bin. Completely lost!
    Heard that before but can't replicate this, they always appear in the trash on my Mac.

  • Windows 7 VERY slow browsing and creating folders

    Hi!
    I'm having a rather strange problem with Windows 7 RC.  I've noticed that browsing folders is generally slower than in WinXP, but still acceptable.  But lately I'm having a lot of difficulties moving files, creating folders, renaming folders and files, and even waiting for an Explorer window to refresh after some external app has created or modified a file.  Sometimes I have to wait up to 30 seconds for a new folder to be created, and another 10 or 15 after I rename it (from "New Folder" to whatever else).
    This does not happen in every folder in my HDD, but I don't know exactly in which ones.  I thought it was the indexed folders, so I removed a few from the Windows Indexing database, and they were still slow (after system reboot and all).  Then I thought it would probably happen in folders that are part of a library, so I removed them and the problem was still there.  I can't think of another reason for this to happen in some folders and not others.  It seems to happen in my frequently used folders, which honestly sucks.
    Just for the record, here's my system's specs:
    Dell Inspiron 9400 laptop (e1705), late 2006 model
    2GB DDR2 667 ram
    320 GB 7200 rpm seagate HDD, aftermarket (really fast drive, not the problem here)
    Intel Core Duo (Centrino Duo) 2.0GHZ
    Windows 7 RC, multiboot with WinXP
    Thanks!!!

    For the benefit of those who are being driven nuts with SLLOOOWWWW Explorer 'Problems', I list the methodology which has worked for me.
    As always, 'Use at Own Risk' and 'Your Mileage May Vary'.
    Do NOT repeat NOT perform these steps unless youfully understand the ramifications and are prepared to live with the consequences.
    BACKUP FIRST !!! - Create a RESTORE POINT!
    The latest incarnations of Windows attempt to 'out-think' the user in order to provide a 'Better Computing Experience', and that is well and good for the average Joe-Blow, but NOT what the Power-User wants or expects.  There are MANY suggestions as
    to the cause and solution(s) for slow Explorer response, but we have to remember just how much work is going on behind the scenes.
    Much of that work is to provide 'pretty' screen enhancements and to make for 'simpler' Searching.  By foregoing some of these we can reclaim quite a lot of CPU cycles and Disk I/O for our own (Applications) use.
    Before you embark on any changes, carefully assess just how you use your PC. - How important are Thumbnails? - What value does Content View really provide? - Can you implement a Folder structure and File-Naming convention which makes Snippets and Content
    indexing of little use?
    You'll still be able to see local thumbnails if that's what you want, they will just be remade each time you open the folder and select Thumbnail (Large Icon) View.  This is usually less bothersome than the time loss of having a 'Master' Thumbnail
    cache maintained and updated for every file operation.
    Certainly, some 3rd Party 'add-ons' (Power Archiver for one! & similar) may cause problems, as can poorly configured A/V programs (realtime checking of Notepad for instance, every time it is opened??? Why not bring back the old innoculate method?) -
    but I digress.
    For many, the slow Explorer problem exists without any of the suspects / causes mentioned in previous Posts, or elsewhere online.
    I repeat: 'This methodology has worked for me - Your Mileage May Vary'.
    Now for the fun & games:
    Kill the time and resource hog 'Indexing Services' - Plenty of advice on how to do that is available online.
    DISALLOW Indexing on all volumes.
    To retain the ability to search for my files, I have been using the Search Everything tool from:
    http://www.voidtools.com/ which searches ONLY on local or removable NTFS volumes. (ie NOT FAT32 USB Drives!)  But that poses very little problem when I examine my real-world use of any Search Tool.
    SE needs Administrator privileges for its low-level file-system access, certainly not an issue to have a responsive Global Search at your fingertips.
    With 34.5 Gb (> 137,000 files in > 20,000 folders) on HDD, and 627 Gb (> 2,300,000 files in > 82,500 folders) on a Portable USB Drive, Search Everything has about 74Kb RAM usage and the db file is 10.5 Mb on disk - not a huge overhead.
    The initial run occupied about 10 minutes of my setting options and less than 5 minutes for the building of the database.
    The online FAQ has plenty of information including how to use wildcards, Path Matching, boolean operators and regex use.
    With a lean mean responsive search at hand, now to clobber some more of the 'features' which are supposed to 'help' us in our computing experience...
    Big Guns Time!
    Start Group Policy Editor -
    Start > Run > gpedit.msc
    Navigate to:
    Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Windows Explorer
    Locate and ENABLE the settings as listed:
    1. Turn off the display of thumbnails and only display icons on network folders
    Disables the display of thumbnails on network folders in Windows Explorer.
    Windows Explorer displays thumbnails on network folders by default.
    If you enable this policy. Windows Explorer will only display icons and never display thumbnails on network folders.
    That gets rid of the first time-waster - Network access is slow enough without adding the extra traffic for thumbnails, and many PCs are stand-alone anyway.
    2. Turn off the caching of thumbnails in hidden thumbs.db files.
    Turns off the caching of thumbnails in hidden thumbs.db files.
    This policy setting allows you to configure Windows Explorer to cache thumbnails of items residing in network folders in hidden thumbs.db files.
    If you enable this policy setting, Windows Explorer does not create, read from, or write to thumbs.db files.
    If you disable or do not configure this policy setting, Windows Explorer creates, reads from, and writes to thumbs.db files.
    This goes hand-in hand with 1.
    3. Turn off Windows Libraries features that rely on indexed file data
    This policy setting allows you to turn off Windows Libraries features that need indexed file metadata to function properly. If you enable this policy, some Windows Libraries features will be turned off to better handle included folders that have been
    redirected to non-indexed network locations. Setting this policy will:
    * Disable all Arrangement views except for "By Folder"
    * Disable all Search filter suggestions other than "Date Modified" and "Size"
    * Disable view of file content snippets in Content mode when search results are returned
    * Disable ability to stack in the Context menu and Column headers
    * Exclude Libraries from the scope of Start search
    This policy will not enable users to add unsupported locations to Libraries.
    If you enable this policy, Windows Libraries features that rely on indexed file data will be disabled.
    If you disable or do not configure this policy, all default Window Libraries features will be enabled.
    Well, with Indexing turned OFF, this one is a real no-brainer, isn't it?
    4. Turn off the display of snippets in Content view mode
    Disables the display of snippets when Content view mode is turned on.
    Windows Explorer shows snippets in Content view mode by default.
    If you enable this policy, Windows Explorer will not display snippets in Content view mode.
    That stops peeking into every file and trying to decode the snippet - MORE time-saving.
    5. Turn off caching of thumbnail pictures
    This setting controls whether the thumbnail views are cached.
    If you enable this setting, thumbnail views are not cached.
    If you disable or do not configure this setting, thumbnail views are cached.
    Note: For shared corporate workstations or computers where security is a top concern, you should enable this setting to turn off the thumbnail view cache, because the thumbnail cache can be read by everyone.
    It (IMHO) is faster to generate the thumbnails as needed (for my usage anyway), rather than to be attempting to maintain a global cache each time a file is created, modified, deleted or moved.
    This completely cuts out the thumbnail caching overheads, and makes quite an impressive speed difference.  Even on an old 1.7 GHz Laptop with 2 Gb RAM and an Intel 915GM Graphics Card (NOT the best choice for Win 7 by any means!).
    6. Turn off numerical sorting in Windows Explorer
    This policy setting allows you to have file names sorted literally (as in Windows 2000 and earlier) rather than in numerical order.
    If you enable this policy setting, Windows Explorer will sort file names by each digit in a file name (for example, 111 < 22 < 3).
    If you disable or do not configure this policy setting, Windows Explorer will sort file names by increasing number value (for example, 3 < 22 < 111).
    Do I REALLY want to waste the time on this procedure? If I want to sequence my files, I'll prefix the filenames with 0's - 003 < 022 < 111. Not a problem!
    Subjectively, these changes make for a much more responsive system.
    Objectively, moving over 2.3 Gb (7,500+ files) via 'Drag & Drop' from HDD to USB Drive shrank from 12 Mins+ to about 8 Mins. Explorer did NOT 'freeze', and I could freely change the displayed folders in both the Source and Target Explorer windows.
    I hope that this is of use to others, it has served me well for the last several months.
    A few minor delays when wanting thumbnail views, but certainly FAR LESS DELAY than before the changes, and
    no more stalled Explorer.
    2010: - Windows? - MAC OS X? - LINUX? - UBUNTU? - 1982: - Commodore C=64? - Amiga? - BBC Micro? - Apple II? - Same old play, only the actors have changed.

  • Disable Static IP in Windows 8.1 and Windows 7 or Powershell Script to get network "connected to" value

    Hi,
    I´m in a situation where I need to disable static IP option on all Domain machines (workstations). I have found many different forum topics about that but nothing is suitable for me. Let me describe a situation:
    * In our environment every computer have specific IP configured in DHCP (specific MAC = specific IP). Machines Must be configured DHCP enabled!
    * In our environment all developers are local admins in their computers. This can´t be changed as we are IT corporation and this is our policy.
    * As every IP have specific rights in Firewall to access different places then some IT guys are quite smart to change their IP to static IP that have more access then they should have.
    This last thing is my main problem! We have working PKI and NPS in both WLAN and LAN so only domain and certified computers can have access to our local network. My mission is to prevent local admins to change IP addressess by themselves but I can´t find
    a good solution for doing that. I have tought about Powershell script that is published by SCCM or GPO to all workstations and script idea is to find network card that is "connected to" our "domain.com" network. If this is true then automatically
    DHCP will be enabled for that interface (Set-NetIPInterface -Dhcp Enabled). I know that here is an open window for some moment when script will be ran again or GPO policy will be refreshed but it´s better then nothing. In this script I have one problem - I
    can´t find a solution about how to find network interface that is connected to our "domain.com"? It seems that there is no easy way to do that. 
    Is there any other and better solution to accomplished this situation. Any good ideas will be appreciated.
    Best Regards,
    Taavi

    Hi,
    the real answer is the one you don't want to hear: don't make your users local admninistrators.
    Local administrators will always be able to get araound any security measurement you put in place. For gpo's for example, they can identify the involved registry key, configure it to their desired value and
    remove privileges for everyone but themselves to write the key. Upcoming 'gpupdate' will not be able to write the values...
    For your script, I would recommend to just configure all adapters to dhcp on the client computers. After all the location detection depends on the network Location Awareness service. If your users disable that one (an rermove the appropriate privileges from
    registry ;) ) your script would again be useless.
    That being said, as you post to the security forums my answer is focussed on the security off your solution. if you need assistance in creating this script, I would advice to post back in the Scripting guys forums (and leave out the why as you will otherwise
    agin be pointed on the flawed security ;) )
    I think get-connectionprofile might already be helpull on 8.1
    MCP/MCSA/MCTS/MCITP

  • Apple deciding what is junk mail and creating folders on my Mac

    I am becoming far less enthused with Apple.  For Apple to be filtering my email, to decided what is OK for me read and what is not, Apple must read my email and decide for me like a Big Brother, reasoning "it's for my own good". 
    Further Apple has demonstrated that not only can they direct where in my computer information is placed Apple can also create folders remotely in my MacIntosh computer as if Apple owned my computer, not me.
    My computer belongs to me, not Apple.  I decide what is SPAM and what is not.  I decide where information in placed not Apple.  I decide if a folder is created not Apple.
    With iCloud based email service Apple is not just coordinating  your email, Apple is deciding for you what is appropriate for you and where information is to be stored.  Its a small thing ownership, but its an important thing.  Good people died so we can have ownership.

    jimoase wrote:
    Csound1 wrote:
    jimoase wrote:
    Let's assume for a second that no one has a complaint: would there be a problem to solve?
    Reasoning that because someone else does something that makes everyone else doing it OK, seems a little weak in the unalienable rights department.
    I agree that if you like someone deciding for you what is good for you and what is not appropriate, that is your right to make that decision for you.  Neither you or Apple can assume that right for others without their consent.  Until the first part of April this year Apple did not make that decision for you.
    Has Apple asked you for your permission to read your email and decide/censor what you information you can store in your InBox and what you can not?
    More nonsense, Apple do not read your email, or add folders to your Mac, you are living a fantasy.
    And please note, you do NOT own OS X (which is what you are actually talking about) you have been granted a license to use it under Apples terms, if you don't like that the answer is clear.
    Here is an experiment to try. In Preferences: turn off Junk Mail.   Delete the Junk mailbox with in Mail.  In a few minutes, depending on your email traffic, Apple will recreate the Junk mailbox and place email in the newly create Junk mailbox.
    Who read the email to determine its junk?
    Who created the new Junk mailbox?
    If it wasn't you, it's either Apple or ghosts.  You decide.
    I have no intention of allowing your nonsense to affect me.
    Do it yourself.

  • Problems with PowerShell script

    Hi guys.
    Using this powershell scripts:
    http://gallery.technet.microsoft.com/office/Lync-Environment-Report-cbc6fb1a
    I have already a opened thread on MS TECHNET FORUM:
    http://social.technet.microsoft.com/Forums/office/en-US/a23ffdf8-fb10-4386-b21b-9f06cda84bdd/lync-environment-report-draw-pictures-in-visio?forum=lyncdeploy
    unable to solve the error for powershell script: New-LyncEnvDiagram.
    Is there any of you Power$hell Mai$ter$ able to understand why the script ain't working?
    with best regards,
    bostjanc

    Hi Bostjanc,
    Since we have no test enviroment, and this is difficult for us to debug the script.
    Maybe you can try to leave a comment to ask the author chris for helps:
    http://emptymessage.com/?p=149
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support

  • Please help me with Powershell Script - Message Box to display after Installation

    Hi Guys,
    Am using package model to deploy the software. After installation on client machines i want to display a dialog box to notify the successful installation.
    Currently trying VBScript to show the dialog message.
    But few machines i get this dialog and few machines am not getting, in program command line am calling a batch script.
    Now am planning to use a Power shell scripting to show a message box and trying to call it through a batch script.
    Please assist me with the powershell script which will display a message box like above
    (and let me know in script how to enable the set-execution policy Remote signed enabled)
    Thanks,

    You can set the execution settings from within the client settings.
    For a simple message box without having to load assmemblies
    $wshell = New-Object -ComObject Wscript.Shell
    $wshell.Popup("Operation Completed",0,"Done",0x1)

Maybe you are looking for